/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * NV_LichChieuInternalFrame.java
 *
 * Created on 09-04-2012, 20:06:07
 */
package GUI;

import DAO.MySQLDataAccessHelper;
import DAO.PhimDAO;
import DAO.VeDAO;
import DAO.XuatChieuDAO;
import POJO.NhanVienPoJo;
import POJO.PhimPoJo;
import POJO.XuatChieuPoJo;
import java.awt.Color;
import java.sql.ResultSet;
import javax.swing.DefaultListModel;
import javax.swing.JOptionPane;
import javax.swing.JButton;

/**
 *
 * @author tran quoc thinh
 */
public class NV_LichChieuInternalFrame extends javax.swing.JInternalFrame {

    /** Creates new form NV_LichChieuInternalFrame */
    NhanVienPoJo nv = new NhanVienPoJo();

// <editor-fold defaultstate="collapsed" desc="Các hàm khởi tạo">
 public NV_LichChieuInternalFrame() {
        initComponents();
        KhoiTaoButton();
        DefaultListModel dl = new DefaultListModel();
        this.jlstPhim.setModel(dl);
        try {
            ResultSet rs = PhimDAO.DSPhim();
            while (rs.next()) {
                PhimPoJo ph = new PhimPoJo();
                ph.setMaPhim(rs.getString("MaPhim"));
                ph.setTenPhim(rs.getString("TenPhim"));
                ph.setGioiThieu(rs.getString("GioiThieu"));
                ph.setTinhtrang(rs.getInt("TinhTrang"));
                dl.addElement(ph);
            }
            MySQLDataAccessHelper helper = new MySQLDataAccessHelper();
            helper.Close();
        } catch (Exception ex) {
        }
    }
 
 public NV_LichChieuInternalFrame(NhanVienPoJo nv1)
    {
        nv = new NhanVienPoJo(nv1);
        initComponents();
        KhoiTaoButton();
        DefaultListModel dl = new DefaultListModel();
        this.jlstPhim.setModel(dl);
        try
        {
            ResultSet rs = PhimDAO.DSPhim();            
            while(rs.next())
            {
                PhimPoJo ph = new PhimPoJo();
                ph.setMaPhim(rs.getString("MaPhim"));
                ph.setTenPhim(rs.getString("TenPhim"));
                ph.setGioiThieu(rs.getString("GioiThieu"));               
                ph.setTinhtrang(rs.getInt("TinhTrang"));
                dl.addElement(ph);                           
            }
            MySQLDataAccessHelper helper = new MySQLDataAccessHelper();
            helper.Close();
        }
        catch(Exception ex)
        {
        }
    }
 // </editor-fold>
 
 
 // <editor-fold defaultstate="collapsed" desc="Đặt vé">
public int DatVe(int soghe, int maXC, String maNV) {
        maNV = nv.getMaNV();

        int kqdatve = 1;
        String sqlKTVe = "select * from ve where soghe=" + soghe + " and maxc=" + maXC;
        int kq = VeDAO.KiemTraVeTonTai(sqlKTVe);
        if (kq == 1) {
            String sql = "INSERT INTO `chieuphimonline`.`ve` (`SoGhe`, `MaNV`, `MaXC`) VALUES (" + soghe + ", '" + maNV + "', " + maXC + ");";
            VeDAO.InsertVe(sql);
            MySQLDataAccessHelper helper = new MySQLDataAccessHelper();
            helper.Close();
            JOptionPane.showMessageDialog(this, "Đặt Vé Thành Công!", "Đặt Vé", JOptionPane.INFORMATION_MESSAGE);
            return kqdatve;
        } else {
            int kqxoa = JOptionPane.showConfirmDialog(this, "Vé Đã Tồn Tại! Bạn Có Muốn Hủy Vé Không?", "Đặt Vé", JOptionPane.YES_NO_OPTION);
            if (kqxoa == JOptionPane.YES_OPTION) {
                int maVe = VeDAO.LayMaVe(maXC, soghe);
                String sql = "DELETE FROM `chieuphimonline`.`ve` WHERE `MaVe`='" + maVe + "'";
                MySQLDataAccessHelper helper = new MySQLDataAccessHelper();
                helper.Open();
                int i = helper.excecuteUpdate(sql);
                if (i == 1) {
                    JOptionPane.showMessageDialog(this, "Xóa Vé Thành Công!", "Xóa Vé", JOptionPane.INFORMATION_MESSAGE);
                    kqdatve = -1;
                } else {
                    JOptionPane.showMessageDialog(this, "Xóa Vé Thất Bại!", "Xóa Vé", JOptionPane.INFORMATION_MESSAGE);
//                    return 1;
                }
                helper.Close();
            }
        }
        return kqdatve;
    }
// </editor-fold>
 
 
// <editor-fold defaultstate="collapsed" desc="Khởi tạo button gồm setBackground và setVisibility">
 public void KhoiTaoButton() {
        this.jButton1.setBackground(Color.gray);
        this.jButton2.setBackground(Color.gray);
        this.jButton3.setBackground(Color.gray);
        this.jButton4.setBackground(Color.gray);
        this.jButton5.setBackground(Color.gray);
        this.jButton6.setBackground(Color.gray);
        this.jButton7.setBackground(Color.gray);
        this.jButton8.setBackground(Color.gray);
        this.jButton9.setBackground(Color.gray);
        this.jButton10.setBackground(Color.gray);
        this.jButton11.setBackground(Color.gray);
        this.jButton12.setBackground(Color.gray);
        this.jButton13.setBackground(Color.gray);
        this.jButton14.setBackground(Color.gray);
        this.jButton15.setBackground(Color.gray);
        this.jButton16.setBackground(Color.gray);
        this.jButton17.setBackground(Color.gray);
        this.jButton18.setBackground(Color.gray);
        this.jButton19.setBackground(Color.gray);
        this.jButton20.setBackground(Color.gray);
        this.jButton21.setBackground(Color.gray);
        this.jButton22.setBackground(Color.gray);
        this.jButton23.setBackground(Color.gray);
        this.jButton24.setBackground(Color.gray);
        this.jButton25.setBackground(Color.gray);
        this.jButton26.setBackground(Color.gray);
        this.jButton27.setBackground(Color.gray);
        this.jButton28.setBackground(Color.gray);
        this.jButton29.setBackground(Color.gray);
        this.jButton30.setBackground(Color.gray);
        this.jButton31.setBackground(Color.gray);
        this.jButton32.setBackground(Color.gray);
        this.jButton33.setBackground(Color.gray);
        this.jButton34.setBackground(Color.gray);
        this.jButton35.setBackground(Color.gray);
        this.jButton36.setBackground(Color.gray);
        this.jButton37.setBackground(Color.gray);
        this.jButton38.setBackground(Color.gray);
        this.jButton39.setBackground(Color.gray);
        this.jButton40.setBackground(Color.gray);
        this.jButton41.setBackground(Color.gray);
        this.jButton42.setBackground(Color.gray);
        this.jButton43.setBackground(Color.gray);
        this.jButton44.setBackground(Color.gray);
        this.jButton45.setBackground(Color.gray);
        this.jButton46.setBackground(Color.gray);
        this.jButton47.setBackground(Color.gray);
        this.jButton48.setBackground(Color.gray);
        this.jButton49.setBackground(Color.gray);
        this.jButton50.setBackground(Color.gray);
        this.jButton51.setBackground(Color.gray);
        this.jButton52.setBackground(Color.gray);
        this.jButton53.setBackground(Color.gray);
        this.jButton54.setBackground(Color.gray);
        this.jButton55.setBackground(Color.gray);

        this.jButton1.setVisible(true);
        this.jButton2.setVisible(true);
        this.jButton3.setVisible(true);
        this.jButton4.setVisible(true);
        this.jButton5.setVisible(true);
        this.jButton6.setVisible(true);
        this.jButton7.setVisible(true);
        this.jButton8.setVisible(true);
        this.jButton9.setVisible(true);
        this.jButton10.setVisible(true);
        this.jButton11.setVisible(true);
        this.jButton12.setVisible(true);
        this.jButton13.setVisible(true);
        this.jButton14.setVisible(true);
        this.jButton15.setVisible(true);
        this.jButton16.setVisible(true);
        this.jButton17.setVisible(true);
        this.jButton18.setVisible(true);
        this.jButton19.setVisible(true);
        this.jButton20.setVisible(true);
        this.jButton21.setVisible(true);
        this.jButton22.setVisible(true);
        this.jButton23.setVisible(true);
        this.jButton24.setVisible(true);
        this.jButton25.setVisible(true);
        this.jButton26.setVisible(true);
        this.jButton27.setVisible(true);
        this.jButton28.setVisible(true);
        this.jButton29.setVisible(true);
        this.jButton30.setVisible(true);
        this.jButton31.setVisible(true);
        this.jButton32.setVisible(true);
        this.jButton33.setVisible(true);
        this.jButton34.setVisible(true);
        this.jButton35.setVisible(true);
        this.jButton36.setVisible(true);
        this.jButton37.setVisible(true);
        this.jButton38.setVisible(true);
        this.jButton39.setVisible(true);
        this.jButton40.setVisible(true);
        this.jButton41.setVisible(true);
        this.jButton42.setVisible(true);
        this.jButton43.setVisible(true);
        this.jButton44.setVisible(true);
        this.jButton45.setVisible(true);
        this.jButton46.setVisible(true);
        this.jButton47.setVisible(true);
        this.jButton48.setVisible(true);
        this.jButton49.setVisible(true);
        this.jButton50.setVisible(true);
        this.jButton51.setVisible(true);
        this.jButton52.setVisible(true);
        this.jButton53.setVisible(true);
        this.jButton54.setVisible(true);
        this.jButton55.setVisible(true);
    }
// </editor-fold>
  

   
 // <editor-fold defaultstate="collapsed" desc="Khởi tạo của netbean">

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        jSeparator1 = new javax.swing.JSeparator();
        jLabel1 = new javax.swing.JLabel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jlstPhim = new javax.swing.JList();
        jPanel2 = new javax.swing.JPanel();
        jSeparator2 = new javax.swing.JSeparator();
        jLabel2 = new javax.swing.JLabel();
        jScrollPane2 = new javax.swing.JScrollPane();
        jlstXuatChieu = new javax.swing.JList();
        jPanel3 = new javax.swing.JPanel();
        jSeparator3 = new javax.swing.JSeparator();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jInternalFrame1 = new javax.swing.JInternalFrame();
        jButton1 = new javax.swing.JButton();
        jButton2 = new javax.swing.JButton();
        jButton3 = new javax.swing.JButton();
        jButton4 = new javax.swing.JButton();
        jButton5 = new javax.swing.JButton();
        jButton6 = new javax.swing.JButton();
        jButton7 = new javax.swing.JButton();
        jButton8 = new javax.swing.JButton();
        jButton9 = new javax.swing.JButton();
        jButton10 = new javax.swing.JButton();
        jButton11 = new javax.swing.JButton();
        jButton12 = new javax.swing.JButton();
        jButton13 = new javax.swing.JButton();
        jButton14 = new javax.swing.JButton();
        jButton15 = new javax.swing.JButton();
        jButton16 = new javax.swing.JButton();
        jButton17 = new javax.swing.JButton();
        jButton18 = new javax.swing.JButton();
        jButton19 = new javax.swing.JButton();
        jButton20 = new javax.swing.JButton();
        jButton21 = new javax.swing.JButton();
        jButton22 = new javax.swing.JButton();
        jButton23 = new javax.swing.JButton();
        jButton24 = new javax.swing.JButton();
        jButton25 = new javax.swing.JButton();
        jButton26 = new javax.swing.JButton();
        jButton27 = new javax.swing.JButton();
        jButton28 = new javax.swing.JButton();
        jButton29 = new javax.swing.JButton();
        jButton30 = new javax.swing.JButton();
        jButton31 = new javax.swing.JButton();
        jButton32 = new javax.swing.JButton();
        jButton33 = new javax.swing.JButton();
        jButton34 = new javax.swing.JButton();
        jButton35 = new javax.swing.JButton();
        jButton36 = new javax.swing.JButton();
        jButton37 = new javax.swing.JButton();
        jButton38 = new javax.swing.JButton();
        jButton39 = new javax.swing.JButton();
        jButton40 = new javax.swing.JButton();
        jButton41 = new javax.swing.JButton();
        jButton42 = new javax.swing.JButton();
        jButton43 = new javax.swing.JButton();
        jButton44 = new javax.swing.JButton();
        jButton45 = new javax.swing.JButton();
        jButton46 = new javax.swing.JButton();
        jButton47 = new javax.swing.JButton();
        jButton48 = new javax.swing.JButton();
        jButton49 = new javax.swing.JButton();
        jButton50 = new javax.swing.JButton();
        jButton51 = new javax.swing.JButton();
        jButton52 = new javax.swing.JButton();
        jButton53 = new javax.swing.JButton();
        jButton54 = new javax.swing.JButton();
        jButton55 = new javax.swing.JButton();

        jPanel1.setBackground(new java.awt.Color(204, 204, 204));

        jLabel1.setFont(new java.awt.Font("Tahoma", 1, 14));
        jLabel1.setText("Chọn Phim");

        jlstPhim.setModel(new javax.swing.AbstractListModel() {
            String[] strings = { "Hót boi nổi loạn", "Mười giờ", " " };
            public int getSize() { return strings.length; }
            public Object getElementAt(int i) { return strings[i]; }
        });
        jlstPhim.addListSelectionListener(new javax.swing.event.ListSelectionListener() {
            public void valueChanged(javax.swing.event.ListSelectionEvent evt) {
                jlstPhimValueChanged(evt);
            }
        });
        jScrollPane1.setViewportView(jlstPhim);

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 199, Short.MAX_VALUE)
                    .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jSeparator1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 199, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(11, 11, 11)
                .addComponent(jLabel1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 526, Short.MAX_VALUE)
                .addContainerGap())
        );

        jPanel2.setBackground(new java.awt.Color(204, 204, 204));

        jLabel2.setFont(new java.awt.Font("Tahoma", 1, 14));
        jLabel2.setText("Xuất Chiếu");

        jlstXuatChieu.setModel(new javax.swing.AbstractListModel() {
            String[] strings = { "9h - 10h30", "11h -12h30", "14h - 15h30", "17h30 - 19h", "20h - 21h30" };
            public int getSize() { return strings.length; }
            public Object getElementAt(int i) { return strings[i]; }
        });
        jlstXuatChieu.setEnabled(false);
        jlstXuatChieu.addListSelectionListener(new javax.swing.event.ListSelectionListener() {
            public void valueChanged(javax.swing.event.ListSelectionEvent evt) {
                jlstXuatChieuValueChanged(evt);
            }
        });
        jScrollPane2.setViewportView(jlstXuatChieu);

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jScrollPane2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 156, Short.MAX_VALUE)
                    .addComponent(jSeparator2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 156, Short.MAX_VALUE)
                    .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.LEADING))
                .addContainerGap())
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel2)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 526, Short.MAX_VALUE)
                .addContainerGap())
        );

        jPanel3.setBackground(new java.awt.Color(204, 204, 204));

        jLabel3.setFont(new java.awt.Font("Tahoma", 1, 14));
        jLabel3.setText("Chọn Ghế");

        jLabel4.setBackground(new java.awt.Color(51, 51, 255));
        jLabel4.setFont(new java.awt.Font("Tahoma", 1, 14));
        jLabel4.setForeground(new java.awt.Color(0, 0, 255));
        jLabel4.setText("MÀN HÌNH");

        jInternalFrame1.setVisible(true);
        jInternalFrame1.getContentPane().setLayout(new java.awt.GridLayout(5, 5, 3, 3));

        jButton1.setText("1");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });
        jInternalFrame1.getContentPane().add(jButton1);

        jButton2.setText("2");
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });
        jInternalFrame1.getContentPane().add(jButton2);

        jButton3.setText("3");
        jButton3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton3ActionPerformed(evt);
            }
        });
        jInternalFrame1.getContentPane().add(jButton3);

        jButton4.setText("4");
        jButton4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton4ActionPerformed(evt);
            }
        });
        jInternalFrame1.getContentPane().add(jButton4);

        jButton5.setText("5");
        jButton5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton5ActionPerformed(evt);
            }
        });
        jInternalFrame1.getContentPane().add(jButton5);

        jButton6.setText("6");
        jButton6.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton6ActionPerformed(evt);
            }
        });
        jInternalFrame1.getContentPane().add(jButton6);

        jButton7.setText("7");
        jButton7.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton7ActionPerformed(evt);
            }
        });
        jInternalFrame1.getContentPane().add(jButton7);

        jButton8.setText("8");
        jButton8.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton8ActionPerformed(evt);
            }
        });
        jInternalFrame1.getContentPane().add(jButton8);

        jButton9.setText("9");
        jButton9.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton9ActionPerformed(evt);
            }
        });
        jInternalFrame1.getContentPane().add(jButton9);

        jButton10.setText("10");
        jButton10.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton10ActionPerformed(evt);
            }
        });
        jInternalFrame1.getContentPane().add(jButton10);

        jButton11.setText("11");
        jButton11.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton11ActionPerformed(evt);
            }
        });
        jInternalFrame1.getContentPane().add(jButton11);

        jButton12.setText("12");
        jButton12.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton12ActionPerformed(evt);
            }
        });
        jInternalFrame1.getContentPane().add(jButton12);

        jButton13.setText("13");
        jButton13.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton13ActionPerformed(evt);
            }
        });
        jInternalFrame1.getContentPane().add(jButton13);

        jButton14.setText("14");
        jButton14.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton14ActionPerformed(evt);
            }
        });
        jInternalFrame1.getContentPane().add(jButton14);

        jButton15.setText("15");
        jButton15.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton15ActionPerformed(evt);
            }
        });
        jInternalFrame1.getContentPane().add(jButton15);

        jButton16.setText("16");
        jButton16.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton16ActionPerformed(evt);
            }
        });
        jInternalFrame1.getContentPane().add(jButton16);

        jButton17.setText("17");
        jButton17.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton17ActionPerformed(evt);
            }
        });
        jInternalFrame1.getContentPane().add(jButton17);

        jButton18.setText("18");
        jButton18.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton18ActionPerformed(evt);
            }
        });
        jInternalFrame1.getContentPane().add(jButton18);

        jButton19.setText("19");
        jButton19.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton19ActionPerformed(evt);
            }
        });
        jInternalFrame1.getContentPane().add(jButton19);

        jButton20.setText("20");
        jButton20.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton20ActionPerformed(evt);
            }
        });
        jInternalFrame1.getContentPane().add(jButton20);

        jButton21.setText("21");
        jButton21.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton21ActionPerformed(evt);
            }
        });
        jInternalFrame1.getContentPane().add(jButton21);

        jButton22.setText("22");
        jButton22.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton22ActionPerformed(evt);
            }
        });
        jInternalFrame1.getContentPane().add(jButton22);

        jButton23.setText("23");
        jButton23.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton23ActionPerformed(evt);
            }
        });
        jInternalFrame1.getContentPane().add(jButton23);

        jButton24.setText("24");
        jButton24.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton24ActionPerformed(evt);
            }
        });
        jInternalFrame1.getContentPane().add(jButton24);

        jButton25.setText("25");
        jButton25.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton25ActionPerformed(evt);
            }
        });
        jInternalFrame1.getContentPane().add(jButton25);

        jButton26.setText("26");
        jButton26.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton26ActionPerformed(evt);
            }
        });
        jInternalFrame1.getContentPane().add(jButton26);

        jButton27.setText("27");
        jButton27.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton27ActionPerformed(evt);
            }
        });
        jInternalFrame1.getContentPane().add(jButton27);

        jButton28.setText("28");
        jButton28.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton28ActionPerformed(evt);
            }
        });
        jInternalFrame1.getContentPane().add(jButton28);

        jButton29.setText("29");
        jButton29.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton29ActionPerformed(evt);
            }
        });
        jInternalFrame1.getContentPane().add(jButton29);

        jButton30.setText("30");
        jButton30.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton30ActionPerformed(evt);
            }
        });
        jInternalFrame1.getContentPane().add(jButton30);

        jButton31.setText("31");
        jButton31.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton31ActionPerformed(evt);
            }
        });
        jInternalFrame1.getContentPane().add(jButton31);

        jButton32.setText("32");
        jButton32.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton32ActionPerformed(evt);
            }
        });
        jInternalFrame1.getContentPane().add(jButton32);

        jButton33.setText("33");
        jButton33.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton33ActionPerformed(evt);
            }
        });
        jInternalFrame1.getContentPane().add(jButton33);

        jButton34.setText("34");
        jButton34.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton34ActionPerformed(evt);
            }
        });
        jInternalFrame1.getContentPane().add(jButton34);

        jButton35.setText("35");
        jButton35.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton35ActionPerformed(evt);
            }
        });
        jInternalFrame1.getContentPane().add(jButton35);

        jButton36.setText("36");
        jButton36.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton36ActionPerformed(evt);
            }
        });
        jInternalFrame1.getContentPane().add(jButton36);

        jButton37.setText("37");
        jButton37.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton37ActionPerformed(evt);
            }
        });
        jInternalFrame1.getContentPane().add(jButton37);

        jButton38.setText("38");
        jButton38.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton38ActionPerformed(evt);
            }
        });
        jInternalFrame1.getContentPane().add(jButton38);

        jButton39.setText("39");
        jButton39.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton39ActionPerformed(evt);
            }
        });
        jInternalFrame1.getContentPane().add(jButton39);

        jButton40.setText("40");
        jButton40.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton40ActionPerformed(evt);
            }
        });
        jInternalFrame1.getContentPane().add(jButton40);

        jButton41.setText("41");
        jButton41.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton41ActionPerformed(evt);
            }
        });
        jInternalFrame1.getContentPane().add(jButton41);

        jButton42.setText("42");
        jButton42.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton42ActionPerformed(evt);
            }
        });
        jInternalFrame1.getContentPane().add(jButton42);

        jButton43.setText("43");
        jButton43.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton43ActionPerformed(evt);
            }
        });
        jInternalFrame1.getContentPane().add(jButton43);

        jButton44.setText("44");
        jButton44.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton44ActionPerformed(evt);
            }
        });
        jInternalFrame1.getContentPane().add(jButton44);

        jButton45.setText("45");
        jButton45.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton45ActionPerformed(evt);
            }
        });
        jInternalFrame1.getContentPane().add(jButton45);

        jButton46.setText("46");
        jButton46.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton46ActionPerformed(evt);
            }
        });
        jInternalFrame1.getContentPane().add(jButton46);

        jButton47.setText("47");
        jButton47.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton47ActionPerformed(evt);
            }
        });
        jInternalFrame1.getContentPane().add(jButton47);

        jButton48.setText("48");
        jButton48.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton48ActionPerformed(evt);
            }
        });
        jInternalFrame1.getContentPane().add(jButton48);

        jButton49.setText("49");
        jButton49.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton49ActionPerformed(evt);
            }
        });
        jInternalFrame1.getContentPane().add(jButton49);

        jButton50.setText("50");
        jButton50.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton50ActionPerformed(evt);
            }
        });
        jInternalFrame1.getContentPane().add(jButton50);

        jButton51.setText("51");
        jButton51.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton51ActionPerformed(evt);
            }
        });
        jInternalFrame1.getContentPane().add(jButton51);

        jButton52.setText("52");
        jButton52.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton52ActionPerformed(evt);
            }
        });
        jInternalFrame1.getContentPane().add(jButton52);

        jButton53.setText("53");
        jButton53.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton53ActionPerformed(evt);
            }
        });
        jInternalFrame1.getContentPane().add(jButton53);

        jButton54.setText("54");
        jButton54.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton54ActionPerformed(evt);
            }
        });
        jInternalFrame1.getContentPane().add(jButton54);

        jButton55.setText("55");
        jButton55.setBorderPainted(false);
        jButton55.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton55ActionPerformed(evt);
            }
        });
        jInternalFrame1.getContentPane().add(jButton55);

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jInternalFrame1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 708, Short.MAX_VALUE)
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addComponent(jLabel3)
                        .addGap(232, 232, 232)
                        .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jSeparator3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 708, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel3)
                    .addComponent(jLabel4))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jSeparator3, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jInternalFrame1, javax.swing.GroupLayout.DEFAULT_SIZE, 526, Short.MAX_VALUE)
                .addContainerGap())
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(jPanel1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel3, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents
// </editor-fold>
    
   
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
// TODO add your handling code here:
    XuatChieuPoJo xc = new XuatChieuPoJo();
    xc = (XuatChieuPoJo) this.jlstXuatChieu.getSelectedValue();
    int kq = DatVe(1, xc.getMaXC(), "NV1");
    if (kq == 1) {
        this.jButton1.setBackground(Color.red);
    } else {
        this.jButton1.setBackground(Color.gray);
    }

}//GEN-LAST:event_jButton1ActionPerformed

// <editor-fold defaultstate="collapsed" desc="Sự kiện chọn Xuất Chiếu">
private void jlstXuatChieuValueChanged(javax.swing.event.ListSelectionEvent evt) {//GEN-FIRST:event_jlstXuatChieuValueChanged
// TODO add your handling code here:
    KhoiTaoButton();
    XuatChieuPoJo xc = new XuatChieuPoJo();
    try {
        xc = (XuatChieuPoJo) this.jlstXuatChieu.getSelectedValue();
        int maXC = xc.getMaXC();
        ResultSet rssoghe = XuatChieuDAO.LaySoGheNgoiCuaPhong(maXC);
        int soghe = 0;
        while (rssoghe.next()) {
            soghe = rssoghe.getInt("TongSoGhe");
        }
        switch (soghe) {
            case 54:
                jButton55.setVisible(false);
                break;
            case 53:
                jButton54.setVisible(false);
                jButton55.setVisible(false);
                break;
            case 52:
                jButton54.setVisible(false);
                jButton55.setVisible(false);
                jButton53.setVisible(false);
                break;
            case 51:
                this.jButton52.setVisible(false);
                this.jButton53.setVisible(false);
                this.jButton54.setVisible(false);
                this.jButton55.setVisible(false);
                break;
            case 50:
                this.jButton51.setVisible(false);
                this.jButton52.setVisible(false);
                this.jButton53.setVisible(false);
                this.jButton54.setVisible(false);
                this.jButton55.setVisible(false);
                break;
            case 49:
                this.jButton50.setVisible(false);
                this.jButton51.setVisible(false);
                this.jButton52.setVisible(false);
                this.jButton53.setVisible(false);
                this.jButton54.setVisible(false);
                this.jButton55.setVisible(false);
                break;
            case 48:
                this.jButton49.setVisible(false);
                this.jButton50.setVisible(false);
                this.jButton51.setVisible(false);
                this.jButton52.setVisible(false);
                this.jButton53.setVisible(false);
                this.jButton54.setVisible(false);
                this.jButton55.setVisible(false);
                break;
            case 47:
                this.jButton48.setVisible(false);
                this.jButton49.setVisible(false);
                this.jButton50.setVisible(false);
                this.jButton51.setVisible(false);
                this.jButton52.setVisible(false);
                this.jButton53.setVisible(false);
                this.jButton54.setVisible(false);
                this.jButton55.setVisible(false);
                break;
            case 46:
                this.jButton47.setVisible(false);
                this.jButton48.setVisible(false);
                this.jButton49.setVisible(false);
                this.jButton50.setVisible(false);
                this.jButton51.setVisible(false);
                this.jButton52.setVisible(false);
                this.jButton53.setVisible(false);
                this.jButton54.setVisible(false);
                this.jButton55.setVisible(false);
                break;
            case 45:
                this.jButton46.setVisible(false);
                this.jButton47.setVisible(false);
                this.jButton48.setVisible(false);
                this.jButton49.setVisible(false);
                this.jButton50.setVisible(false);
                this.jButton51.setVisible(false);
                this.jButton52.setVisible(false);
                this.jButton53.setVisible(false);
                this.jButton54.setVisible(false);
                this.jButton55.setVisible(false);
                break;
            case 44:
                this.jButton45.setVisible(false);
                this.jButton46.setVisible(false);
                this.jButton47.setVisible(false);
                this.jButton48.setVisible(false);
                this.jButton49.setVisible(false);
                this.jButton50.setVisible(false);
                this.jButton51.setVisible(false);
                this.jButton52.setVisible(false);
                this.jButton53.setVisible(false);
                this.jButton54.setVisible(false);
                this.jButton55.setVisible(false);
                break;
            case 43:
                this.jButton44.setVisible(false);
                this.jButton45.setVisible(false);
                this.jButton46.setVisible(false);
                this.jButton47.setVisible(false);
                this.jButton48.setVisible(false);
                this.jButton49.setVisible(false);
                this.jButton50.setVisible(false);
                this.jButton51.setVisible(false);
                this.jButton52.setVisible(false);
                this.jButton53.setVisible(false);
                this.jButton54.setVisible(false);
                this.jButton55.setVisible(false);
                break;
            case 42:
                this.jButton43.setVisible(false);
                this.jButton44.setVisible(false);
                this.jButton45.setVisible(false);
                this.jButton46.setVisible(false);
                this.jButton47.setVisible(false);
                this.jButton48.setVisible(false);
                this.jButton49.setVisible(false);
                this.jButton50.setVisible(false);
                this.jButton51.setVisible(false);
                this.jButton52.setVisible(false);
                this.jButton53.setVisible(false);
                this.jButton54.setVisible(false);
                this.jButton55.setVisible(false);
                break;
            case 41:
                this.jButton42.setVisible(false);
                this.jButton43.setVisible(false);
                this.jButton44.setVisible(false);
                this.jButton45.setVisible(false);
                this.jButton46.setVisible(false);
                this.jButton47.setVisible(false);
                this.jButton48.setVisible(false);
                this.jButton49.setVisible(false);
                this.jButton50.setVisible(false);
                this.jButton51.setVisible(false);
                this.jButton52.setVisible(false);
                this.jButton53.setVisible(false);
                this.jButton54.setVisible(false);
                this.jButton55.setVisible(false);
                break;
            case 40:
                this.jButton41.setVisible(false);
                this.jButton42.setVisible(false);
                this.jButton43.setVisible(false);
                this.jButton44.setVisible(false);
                this.jButton45.setVisible(false);
                this.jButton46.setVisible(false);
                this.jButton47.setVisible(false);
                this.jButton48.setVisible(false);
                this.jButton49.setVisible(false);
                this.jButton50.setVisible(false);
                this.jButton51.setVisible(false);
                this.jButton52.setVisible(false);
                this.jButton53.setVisible(false);
                this.jButton54.setVisible(false);
                this.jButton55.setVisible(false);
                break;
            case 39:

                this.jButton40.setVisible(false);
                this.jButton41.setVisible(false);
                this.jButton42.setVisible(false);
                this.jButton43.setVisible(false);
                this.jButton44.setVisible(false);
                this.jButton45.setVisible(false);
                this.jButton46.setVisible(false);
                this.jButton47.setVisible(false);
                this.jButton48.setVisible(false);
                this.jButton49.setVisible(false);
                this.jButton50.setVisible(false);
                this.jButton51.setVisible(false);
                this.jButton52.setVisible(false);
                this.jButton53.setVisible(false);
                this.jButton54.setVisible(false);
                this.jButton55.setVisible(false);
                break;
            case 38:
                this.jButton39.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton41.setVisible(false);
                this.jButton42.setVisible(false);
                this.jButton43.setVisible(false);
                this.jButton44.setVisible(false);
                this.jButton45.setVisible(false);
                this.jButton46.setVisible(false);
                this.jButton47.setVisible(false);
                this.jButton48.setVisible(false);
                this.jButton49.setVisible(false);
                this.jButton50.setVisible(false);
                this.jButton51.setVisible(false);
                this.jButton52.setVisible(false);
                this.jButton53.setVisible(false);
                this.jButton54.setVisible(false);
                this.jButton55.setVisible(false);
                break;
            case 37:
                this.jButton38.setVisible(false);
                this.jButton39.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton41.setVisible(false);
                this.jButton42.setVisible(false);
                this.jButton43.setVisible(false);
                this.jButton44.setVisible(false);
                this.jButton45.setVisible(false);
                this.jButton46.setVisible(false);
                this.jButton47.setVisible(false);
                this.jButton48.setVisible(false);
                this.jButton49.setVisible(false);
                this.jButton50.setVisible(false);
                this.jButton51.setVisible(false);
                this.jButton52.setVisible(false);
                this.jButton53.setVisible(false);
                this.jButton54.setVisible(false);
                this.jButton55.setVisible(false);
                break;
            case 36:
                this.jButton37.setVisible(false);
                this.jButton38.setVisible(false);
                this.jButton39.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton41.setVisible(false);
                this.jButton42.setVisible(false);
                this.jButton43.setVisible(false);
                this.jButton44.setVisible(false);
                this.jButton45.setVisible(false);
                this.jButton46.setVisible(false);
                this.jButton47.setVisible(false);
                this.jButton48.setVisible(false);
                this.jButton49.setVisible(false);
                this.jButton50.setVisible(false);
                this.jButton51.setVisible(false);
                this.jButton52.setVisible(false);
                this.jButton53.setVisible(false);
                this.jButton54.setVisible(false);
                this.jButton55.setVisible(false);
                break;
            case 35:
                this.jButton36.setVisible(false);
                this.jButton37.setVisible(false);
                this.jButton38.setVisible(false);
                this.jButton39.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton41.setVisible(false);
                this.jButton42.setVisible(false);
                this.jButton43.setVisible(false);
                this.jButton44.setVisible(false);
                this.jButton45.setVisible(false);
                this.jButton46.setVisible(false);
                this.jButton47.setVisible(false);
                this.jButton48.setVisible(false);
                this.jButton49.setVisible(false);
                this.jButton50.setVisible(false);
                this.jButton51.setVisible(false);
                this.jButton52.setVisible(false);
                this.jButton53.setVisible(false);
                this.jButton54.setVisible(false);
                this.jButton55.setVisible(false);
                break;
            case 34:
                this.jButton35.setVisible(false);
                this.jButton36.setVisible(false);
                this.jButton37.setVisible(false);
                this.jButton38.setVisible(false);
                this.jButton39.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton41.setVisible(false);
                this.jButton42.setVisible(false);
                this.jButton43.setVisible(false);
                this.jButton44.setVisible(false);
                this.jButton45.setVisible(false);
                this.jButton46.setVisible(false);
                this.jButton47.setVisible(false);
                this.jButton48.setVisible(false);
                this.jButton49.setVisible(false);
                this.jButton50.setVisible(false);
                this.jButton51.setVisible(false);
                this.jButton52.setVisible(false);
                this.jButton53.setVisible(false);
                this.jButton54.setVisible(false);
                this.jButton55.setVisible(false);
                break;
            case 33:
                this.jButton34.setVisible(false);
                this.jButton35.setVisible(false);
                this.jButton36.setVisible(false);
                this.jButton37.setVisible(false);
                this.jButton38.setVisible(false);
                this.jButton39.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton41.setVisible(false);
                this.jButton42.setVisible(false);
                this.jButton43.setVisible(false);
                this.jButton44.setVisible(false);
                this.jButton45.setVisible(false);
                this.jButton46.setVisible(false);
                this.jButton47.setVisible(false);
                this.jButton48.setVisible(false);
                this.jButton49.setVisible(false);
                this.jButton50.setVisible(false);
                this.jButton51.setVisible(false);
                this.jButton52.setVisible(false);
                this.jButton53.setVisible(false);
                this.jButton54.setVisible(false);
                this.jButton55.setVisible(false);
                break;
            case 32:
                this.jButton33.setVisible(false);
                this.jButton34.setVisible(false);
                this.jButton35.setVisible(false);
                this.jButton36.setVisible(false);
                this.jButton37.setVisible(false);
                this.jButton38.setVisible(false);
                this.jButton39.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton41.setVisible(false);
                this.jButton42.setVisible(false);
                this.jButton43.setVisible(false);
                this.jButton44.setVisible(false);
                this.jButton45.setVisible(false);
                this.jButton46.setVisible(false);
                this.jButton47.setVisible(false);
                this.jButton48.setVisible(false);
                this.jButton49.setVisible(false);
                this.jButton50.setVisible(false);
                this.jButton51.setVisible(false);
                this.jButton52.setVisible(false);
                this.jButton53.setVisible(false);
                this.jButton54.setVisible(false);
                this.jButton55.setVisible(false);
                break;
            case 31:
                this.jButton32.setVisible(false);
                this.jButton33.setVisible(false);
                this.jButton34.setVisible(false);
                this.jButton35.setVisible(false);
                this.jButton36.setVisible(false);
                this.jButton37.setVisible(false);
                this.jButton38.setVisible(false);
                this.jButton39.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton41.setVisible(false);
                this.jButton42.setVisible(false);
                this.jButton43.setVisible(false);
                this.jButton44.setVisible(false);
                this.jButton45.setVisible(false);
                this.jButton46.setVisible(false);
                this.jButton47.setVisible(false);
                this.jButton48.setVisible(false);
                this.jButton49.setVisible(false);
                this.jButton50.setVisible(false);
                this.jButton51.setVisible(false);
                this.jButton52.setVisible(false);
                this.jButton53.setVisible(false);
                this.jButton54.setVisible(false);
                this.jButton55.setVisible(false);
                break;
            case 30:
                this.jButton31.setVisible(false);
                this.jButton32.setVisible(false);
                this.jButton33.setVisible(false);
                this.jButton34.setVisible(false);
                this.jButton35.setVisible(false);
                this.jButton36.setVisible(false);
                this.jButton37.setVisible(false);
                this.jButton38.setVisible(false);
                this.jButton39.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton41.setVisible(false);
                this.jButton42.setVisible(false);
                this.jButton43.setVisible(false);
                this.jButton44.setVisible(false);
                this.jButton45.setVisible(false);
                this.jButton46.setVisible(false);
                this.jButton47.setVisible(false);
                this.jButton48.setVisible(false);
                this.jButton49.setVisible(false);
                this.jButton50.setVisible(false);
                this.jButton51.setVisible(false);
                this.jButton52.setVisible(false);
                this.jButton53.setVisible(false);
                this.jButton54.setVisible(false);
                this.jButton55.setVisible(false);
                break;
            case 29:
                this.jButton30.setVisible(false);
                this.jButton31.setVisible(false);
                this.jButton32.setVisible(false);
                this.jButton33.setVisible(false);
                this.jButton34.setVisible(false);
                this.jButton35.setVisible(false);
                this.jButton36.setVisible(false);
                this.jButton37.setVisible(false);
                this.jButton38.setVisible(false);
                this.jButton39.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton41.setVisible(false);
                this.jButton42.setVisible(false);
                this.jButton43.setVisible(false);
                this.jButton44.setVisible(false);
                this.jButton45.setVisible(false);
                this.jButton46.setVisible(false);
                this.jButton47.setVisible(false);
                this.jButton48.setVisible(false);
                this.jButton49.setVisible(false);
                this.jButton50.setVisible(false);
                this.jButton51.setVisible(false);
                this.jButton52.setVisible(false);
                this.jButton53.setVisible(false);
                this.jButton54.setVisible(false);
                this.jButton55.setVisible(false);
                break;
            case 28:
                this.jButton29.setVisible(false);
                this.jButton30.setVisible(false);
                this.jButton31.setVisible(false);
                this.jButton32.setVisible(false);
                this.jButton33.setVisible(false);
                this.jButton34.setVisible(false);
                this.jButton35.setVisible(false);
                this.jButton36.setVisible(false);
                this.jButton37.setVisible(false);
                this.jButton38.setVisible(false);
                this.jButton39.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton41.setVisible(false);
                this.jButton42.setVisible(false);
                this.jButton43.setVisible(false);
                this.jButton44.setVisible(false);
                this.jButton45.setVisible(false);
                this.jButton46.setVisible(false);
                this.jButton47.setVisible(false);
                this.jButton48.setVisible(false);
                this.jButton49.setVisible(false);
                this.jButton50.setVisible(false);
                this.jButton51.setVisible(false);
                this.jButton52.setVisible(false);
                this.jButton53.setVisible(false);
                this.jButton54.setVisible(false);
                this.jButton55.setVisible(false);
                break;
            case 27:
                this.jButton28.setVisible(false);
                this.jButton29.setVisible(false);
                this.jButton30.setVisible(false);
                this.jButton31.setVisible(false);
                this.jButton32.setVisible(false);
                this.jButton33.setVisible(false);
                this.jButton34.setVisible(false);
                this.jButton35.setVisible(false);
                this.jButton36.setVisible(false);
                this.jButton37.setVisible(false);
                this.jButton38.setVisible(false);
                this.jButton39.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton41.setVisible(false);
                this.jButton42.setVisible(false);
                this.jButton43.setVisible(false);
                this.jButton44.setVisible(false);
                this.jButton45.setVisible(false);
                this.jButton46.setVisible(false);
                this.jButton47.setVisible(false);
                this.jButton48.setVisible(false);
                this.jButton49.setVisible(false);
                this.jButton50.setVisible(false);
                this.jButton51.setVisible(false);
                this.jButton52.setVisible(false);
                this.jButton53.setVisible(false);
                this.jButton54.setVisible(false);
                this.jButton55.setVisible(false);
                break;
            case 26:
                this.jButton27.setVisible(false);
                this.jButton28.setVisible(false);
                this.jButton29.setVisible(false);
                this.jButton30.setVisible(false);
                this.jButton31.setVisible(false);
                this.jButton32.setVisible(false);
                this.jButton33.setVisible(false);
                this.jButton34.setVisible(false);
                this.jButton35.setVisible(false);
                this.jButton36.setVisible(false);
                this.jButton37.setVisible(false);
                this.jButton38.setVisible(false);
                this.jButton39.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton41.setVisible(false);
                this.jButton42.setVisible(false);
                this.jButton43.setVisible(false);
                this.jButton44.setVisible(false);
                this.jButton45.setVisible(false);
                this.jButton46.setVisible(false);
                this.jButton47.setVisible(false);
                this.jButton48.setVisible(false);
                this.jButton49.setVisible(false);
                this.jButton50.setVisible(false);
                this.jButton51.setVisible(false);
                this.jButton52.setVisible(false);
                this.jButton53.setVisible(false);
                this.jButton54.setVisible(false);
                this.jButton55.setVisible(false);
                break;
            case 25:
                this.jButton26.setVisible(false);
                this.jButton27.setVisible(false);
                this.jButton28.setVisible(false);
                this.jButton29.setVisible(false);
                this.jButton30.setVisible(false);
                this.jButton31.setVisible(false);
                this.jButton32.setVisible(false);
                this.jButton33.setVisible(false);
                this.jButton34.setVisible(false);
                this.jButton35.setVisible(false);
                this.jButton36.setVisible(false);
                this.jButton37.setVisible(false);
                this.jButton38.setVisible(false);
                this.jButton39.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton41.setVisible(false);
                this.jButton42.setVisible(false);
                this.jButton43.setVisible(false);
                this.jButton44.setVisible(false);
                this.jButton45.setVisible(false);
                this.jButton46.setVisible(false);
                this.jButton47.setVisible(false);
                this.jButton48.setVisible(false);
                this.jButton49.setVisible(false);
                this.jButton50.setVisible(false);
                this.jButton51.setVisible(false);
                this.jButton52.setVisible(false);
                this.jButton53.setVisible(false);
                this.jButton54.setVisible(false);
                this.jButton55.setVisible(false);
                break;
            case 24:
                this.jButton25.setVisible(false);
                this.jButton26.setVisible(false);
                this.jButton27.setVisible(false);
                this.jButton28.setVisible(false);
                this.jButton29.setVisible(false);
                this.jButton30.setVisible(false);
                this.jButton31.setVisible(false);
                this.jButton32.setVisible(false);
                this.jButton33.setVisible(false);
                this.jButton34.setVisible(false);
                this.jButton35.setVisible(false);
                this.jButton36.setVisible(false);
                this.jButton37.setVisible(false);
                this.jButton38.setVisible(false);
                this.jButton39.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton41.setVisible(false);
                this.jButton42.setVisible(false);
                this.jButton43.setVisible(false);
                this.jButton44.setVisible(false);
                this.jButton45.setVisible(false);
                this.jButton46.setVisible(false);
                this.jButton47.setVisible(false);
                this.jButton48.setVisible(false);
                this.jButton49.setVisible(false);
                this.jButton50.setVisible(false);
                this.jButton51.setVisible(false);
                this.jButton52.setVisible(false);
                this.jButton53.setVisible(false);
                this.jButton54.setVisible(false);
                this.jButton55.setVisible(false);
                break;
            case 23:
                this.jButton24.setVisible(false);
                this.jButton25.setVisible(false);
                this.jButton26.setVisible(false);
                this.jButton27.setVisible(false);
                this.jButton28.setVisible(false);
                this.jButton29.setVisible(false);
                this.jButton30.setVisible(false);
                this.jButton31.setVisible(false);
                this.jButton32.setVisible(false);
                this.jButton33.setVisible(false);
                this.jButton34.setVisible(false);
                this.jButton35.setVisible(false);
                this.jButton36.setVisible(false);
                this.jButton37.setVisible(false);
                this.jButton38.setVisible(false);
                this.jButton39.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton41.setVisible(false);
                this.jButton42.setVisible(false);
                this.jButton43.setVisible(false);
                this.jButton44.setVisible(false);
                this.jButton45.setVisible(false);
                this.jButton46.setVisible(false);
                this.jButton47.setVisible(false);
                this.jButton48.setVisible(false);
                this.jButton49.setVisible(false);
                this.jButton50.setVisible(false);
                this.jButton51.setVisible(false);
                this.jButton52.setVisible(false);
                this.jButton53.setVisible(false);
                this.jButton54.setVisible(false);
                this.jButton55.setVisible(false);
                break;
            case 22:
                this.jButton23.setVisible(false);
                this.jButton24.setVisible(false);
                this.jButton25.setVisible(false);
                this.jButton26.setVisible(false);
                this.jButton27.setVisible(false);
                this.jButton28.setVisible(false);
                this.jButton29.setVisible(false);
                this.jButton30.setVisible(false);
                this.jButton31.setVisible(false);
                this.jButton32.setVisible(false);
                this.jButton33.setVisible(false);
                this.jButton34.setVisible(false);
                this.jButton35.setVisible(false);
                this.jButton36.setVisible(false);
                this.jButton37.setVisible(false);
                this.jButton38.setVisible(false);
                this.jButton39.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton41.setVisible(false);
                this.jButton42.setVisible(false);
                this.jButton43.setVisible(false);
                this.jButton44.setVisible(false);
                this.jButton45.setVisible(false);
                this.jButton46.setVisible(false);
                this.jButton47.setVisible(false);
                this.jButton48.setVisible(false);
                this.jButton49.setVisible(false);
                this.jButton50.setVisible(false);
                this.jButton51.setVisible(false);
                this.jButton52.setVisible(false);
                this.jButton53.setVisible(false);
                this.jButton54.setVisible(false);
                this.jButton55.setVisible(false);
                break;
            case 21:
                this.jButton22.setVisible(false);
                this.jButton23.setVisible(false);
                this.jButton24.setVisible(false);
                this.jButton25.setVisible(false);
                this.jButton26.setVisible(false);
                this.jButton27.setVisible(false);
                this.jButton28.setVisible(false);
                this.jButton29.setVisible(false);
                this.jButton30.setVisible(false);
                this.jButton31.setVisible(false);
                this.jButton32.setVisible(false);
                this.jButton33.setVisible(false);
                this.jButton34.setVisible(false);
                this.jButton35.setVisible(false);
                this.jButton36.setVisible(false);
                this.jButton37.setVisible(false);
                this.jButton38.setVisible(false);
                this.jButton39.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton41.setVisible(false);
                this.jButton42.setVisible(false);
                this.jButton43.setVisible(false);
                this.jButton44.setVisible(false);
                this.jButton45.setVisible(false);
                this.jButton46.setVisible(false);
                this.jButton47.setVisible(false);
                this.jButton48.setVisible(false);
                this.jButton49.setVisible(false);
                this.jButton50.setVisible(false);
                this.jButton51.setVisible(false);
                this.jButton52.setVisible(false);
                this.jButton53.setVisible(false);
                this.jButton54.setVisible(false);
                this.jButton55.setVisible(false);
                break;
            case 20:
                this.jButton21.setVisible(false);
                this.jButton22.setVisible(false);
                this.jButton23.setVisible(false);
                this.jButton24.setVisible(false);
                this.jButton25.setVisible(false);
                this.jButton26.setVisible(false);
                this.jButton27.setVisible(false);
                this.jButton28.setVisible(false);
                this.jButton29.setVisible(false);
                this.jButton30.setVisible(false);
                this.jButton31.setVisible(false);
                this.jButton32.setVisible(false);
                this.jButton33.setVisible(false);
                this.jButton34.setVisible(false);
                this.jButton35.setVisible(false);
                this.jButton36.setVisible(false);
                this.jButton37.setVisible(false);
                this.jButton38.setVisible(false);
                this.jButton39.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton41.setVisible(false);
                this.jButton42.setVisible(false);
                this.jButton43.setVisible(false);
                this.jButton44.setVisible(false);
                this.jButton45.setVisible(false);
                this.jButton46.setVisible(false);
                this.jButton47.setVisible(false);
                this.jButton48.setVisible(false);
                this.jButton49.setVisible(false);
                this.jButton50.setVisible(false);
                this.jButton51.setVisible(false);
                this.jButton52.setVisible(false);
                this.jButton53.setVisible(false);
                this.jButton54.setVisible(false);
                this.jButton55.setVisible(false);
                break;
            case 19:
                this.jButton20.setVisible(false);
                this.jButton21.setVisible(false);
                this.jButton22.setVisible(false);
                this.jButton23.setVisible(false);
                this.jButton24.setVisible(false);
                this.jButton25.setVisible(false);
                this.jButton26.setVisible(false);
                this.jButton27.setVisible(false);
                this.jButton28.setVisible(false);
                this.jButton29.setVisible(false);
                this.jButton30.setVisible(false);
                this.jButton31.setVisible(false);
                this.jButton32.setVisible(false);
                this.jButton33.setVisible(false);
                this.jButton34.setVisible(false);
                this.jButton35.setVisible(false);
                this.jButton36.setVisible(false);
                this.jButton37.setVisible(false);
                this.jButton38.setVisible(false);
                this.jButton39.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton41.setVisible(false);
                this.jButton42.setVisible(false);
                this.jButton43.setVisible(false);
                this.jButton44.setVisible(false);
                this.jButton45.setVisible(false);
                this.jButton46.setVisible(false);
                this.jButton47.setVisible(false);
                this.jButton48.setVisible(false);
                this.jButton49.setVisible(false);
                this.jButton50.setVisible(false);
                this.jButton51.setVisible(false);
                this.jButton52.setVisible(false);
                this.jButton53.setVisible(false);
                this.jButton54.setVisible(false);
                this.jButton55.setVisible(false);
                break;
            case 18:
                this.jButton19.setVisible(false);
                this.jButton20.setVisible(false);
                this.jButton21.setVisible(false);
                this.jButton22.setVisible(false);
                this.jButton23.setVisible(false);
                this.jButton24.setVisible(false);
                this.jButton25.setVisible(false);
                this.jButton26.setVisible(false);
                this.jButton27.setVisible(false);
                this.jButton28.setVisible(false);
                this.jButton29.setVisible(false);
                this.jButton30.setVisible(false);
                this.jButton31.setVisible(false);
                this.jButton32.setVisible(false);
                this.jButton33.setVisible(false);
                this.jButton34.setVisible(false);
                this.jButton35.setVisible(false);
                this.jButton36.setVisible(false);
                this.jButton37.setVisible(false);
                this.jButton38.setVisible(false);
                this.jButton39.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton41.setVisible(false);
                this.jButton42.setVisible(false);
                this.jButton43.setVisible(false);
                this.jButton44.setVisible(false);
                this.jButton45.setVisible(false);
                this.jButton46.setVisible(false);
                this.jButton47.setVisible(false);
                this.jButton48.setVisible(false);
                this.jButton49.setVisible(false);
                this.jButton50.setVisible(false);
                this.jButton51.setVisible(false);
                this.jButton52.setVisible(false);
                this.jButton53.setVisible(false);
                this.jButton54.setVisible(false);
                this.jButton55.setVisible(false);
                break;
            case 17:
                this.jButton18.setVisible(false);
                this.jButton19.setVisible(false);
                this.jButton20.setVisible(false);
                this.jButton21.setVisible(false);
                this.jButton22.setVisible(false);
                this.jButton23.setVisible(false);
                this.jButton24.setVisible(false);
                this.jButton25.setVisible(false);
                this.jButton26.setVisible(false);
                this.jButton27.setVisible(false);
                this.jButton28.setVisible(false);
                this.jButton29.setVisible(false);
                this.jButton30.setVisible(false);
                this.jButton31.setVisible(false);
                this.jButton32.setVisible(false);
                this.jButton33.setVisible(false);
                this.jButton34.setVisible(false);
                this.jButton35.setVisible(false);
                this.jButton36.setVisible(false);
                this.jButton37.setVisible(false);
                this.jButton38.setVisible(false);
                this.jButton39.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton41.setVisible(false);
                this.jButton42.setVisible(false);
                this.jButton43.setVisible(false);
                this.jButton44.setVisible(false);
                this.jButton45.setVisible(false);
                this.jButton46.setVisible(false);
                this.jButton47.setVisible(false);
                this.jButton48.setVisible(false);
                this.jButton49.setVisible(false);
                this.jButton50.setVisible(false);
                this.jButton51.setVisible(false);
                this.jButton52.setVisible(false);
                this.jButton53.setVisible(false);
                this.jButton54.setVisible(false);
                this.jButton55.setVisible(false);
                break;
            case 16:
                this.jButton17.setVisible(false);
                this.jButton18.setVisible(false);
                this.jButton19.setVisible(false);
                this.jButton20.setVisible(false);
                this.jButton21.setVisible(false);
                this.jButton22.setVisible(false);
                this.jButton23.setVisible(false);
                this.jButton24.setVisible(false);
                this.jButton25.setVisible(false);
                this.jButton26.setVisible(false);
                this.jButton27.setVisible(false);
                this.jButton28.setVisible(false);
                this.jButton29.setVisible(false);
                this.jButton30.setVisible(false);
                this.jButton31.setVisible(false);
                this.jButton32.setVisible(false);
                this.jButton33.setVisible(false);
                this.jButton34.setVisible(false);
                this.jButton35.setVisible(false);
                this.jButton36.setVisible(false);
                this.jButton37.setVisible(false);
                this.jButton38.setVisible(false);
                this.jButton39.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton41.setVisible(false);
                this.jButton42.setVisible(false);
                this.jButton43.setVisible(false);
                this.jButton44.setVisible(false);
                this.jButton45.setVisible(false);
                this.jButton46.setVisible(false);
                this.jButton47.setVisible(false);
                this.jButton48.setVisible(false);
                this.jButton49.setVisible(false);
                this.jButton50.setVisible(false);
                this.jButton51.setVisible(false);
                this.jButton52.setVisible(false);
                this.jButton53.setVisible(false);
                this.jButton54.setVisible(false);
                this.jButton55.setVisible(false);
                break;
            case 15:
                this.jButton16.setVisible(false);
                this.jButton17.setVisible(false);
                this.jButton18.setVisible(false);
                this.jButton19.setVisible(false);
                this.jButton20.setVisible(false);
                this.jButton21.setVisible(false);
                this.jButton22.setVisible(false);
                this.jButton23.setVisible(false);
                this.jButton24.setVisible(false);
                this.jButton25.setVisible(false);
                this.jButton26.setVisible(false);
                this.jButton27.setVisible(false);
                this.jButton28.setVisible(false);
                this.jButton29.setVisible(false);
                this.jButton30.setVisible(false);
                this.jButton31.setVisible(false);
                this.jButton32.setVisible(false);
                this.jButton33.setVisible(false);
                this.jButton34.setVisible(false);
                this.jButton35.setVisible(false);
                this.jButton36.setVisible(false);
                this.jButton37.setVisible(false);
                this.jButton38.setVisible(false);
                this.jButton39.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton41.setVisible(false);
                this.jButton42.setVisible(false);
                this.jButton43.setVisible(false);
                this.jButton44.setVisible(false);
                this.jButton45.setVisible(false);
                this.jButton46.setVisible(false);
                this.jButton47.setVisible(false);
                this.jButton48.setVisible(false);
                this.jButton49.setVisible(false);
                this.jButton50.setVisible(false);
                this.jButton51.setVisible(false);
                this.jButton52.setVisible(false);
                this.jButton53.setVisible(false);
                this.jButton54.setVisible(false);
                this.jButton55.setVisible(false);
                break;
            case 14:
                this.jButton17.setVisible(false);
                this.jButton15.setVisible(false);
                this.jButton16.setVisible(false);
                this.jButton18.setVisible(false);
                this.jButton19.setVisible(false);
                this.jButton20.setVisible(false);
                this.jButton21.setVisible(false);
                this.jButton22.setVisible(false);
                this.jButton23.setVisible(false);
                this.jButton24.setVisible(false);
                this.jButton25.setVisible(false);
                this.jButton26.setVisible(false);
                this.jButton27.setVisible(false);
                this.jButton28.setVisible(false);
                this.jButton29.setVisible(false);
                this.jButton30.setVisible(false);
                this.jButton31.setVisible(false);
                this.jButton32.setVisible(false);
                this.jButton33.setVisible(false);
                this.jButton34.setVisible(false);
                this.jButton35.setVisible(false);
                this.jButton36.setVisible(false);
                this.jButton37.setVisible(false);
                this.jButton38.setVisible(false);
                this.jButton39.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton41.setVisible(false);
                this.jButton42.setVisible(false);
                this.jButton43.setVisible(false);
                this.jButton44.setVisible(false);
                this.jButton45.setVisible(false);
                this.jButton46.setVisible(false);
                this.jButton47.setVisible(false);
                this.jButton48.setVisible(false);
                this.jButton49.setVisible(false);
                this.jButton50.setVisible(false);
                this.jButton51.setVisible(false);
                this.jButton52.setVisible(false);
                this.jButton53.setVisible(false);
                this.jButton54.setVisible(false);
                this.jButton55.setVisible(false);
                break;
            case 13:
                this.jButton17.setVisible(false);
                this.jButton14.setVisible(false);
                this.jButton15.setVisible(false);
                this.jButton16.setVisible(false);
                this.jButton18.setVisible(false);
                this.jButton19.setVisible(false);
                this.jButton20.setVisible(false);
                this.jButton21.setVisible(false);
                this.jButton22.setVisible(false);
                this.jButton23.setVisible(false);
                this.jButton24.setVisible(false);
                this.jButton25.setVisible(false);
                this.jButton26.setVisible(false);
                this.jButton27.setVisible(false);
                this.jButton28.setVisible(false);
                this.jButton29.setVisible(false);
                this.jButton30.setVisible(false);
                this.jButton31.setVisible(false);
                this.jButton32.setVisible(false);
                this.jButton33.setVisible(false);
                this.jButton34.setVisible(false);
                this.jButton35.setVisible(false);
                this.jButton36.setVisible(false);
                this.jButton37.setVisible(false);
                this.jButton38.setVisible(false);
                this.jButton39.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton41.setVisible(false);
                this.jButton42.setVisible(false);
                this.jButton43.setVisible(false);
                this.jButton44.setVisible(false);
                this.jButton45.setVisible(false);
                this.jButton46.setVisible(false);
                this.jButton47.setVisible(false);
                this.jButton48.setVisible(false);
                this.jButton49.setVisible(false);
                this.jButton50.setVisible(false);
                this.jButton51.setVisible(false);
                this.jButton52.setVisible(false);
                this.jButton53.setVisible(false);
                this.jButton54.setVisible(false);
                this.jButton55.setVisible(false);
                break;
            case 12:
                this.jButton17.setVisible(false);
                this.jButton13.setVisible(false);
                this.jButton14.setVisible(false);
                this.jButton15.setVisible(false);
                this.jButton16.setVisible(false);
                this.jButton18.setVisible(false);
                this.jButton19.setVisible(false);
                this.jButton20.setVisible(false);
                this.jButton21.setVisible(false);
                this.jButton22.setVisible(false);
                this.jButton23.setVisible(false);
                this.jButton24.setVisible(false);
                this.jButton25.setVisible(false);
                this.jButton26.setVisible(false);
                this.jButton27.setVisible(false);
                this.jButton28.setVisible(false);
                this.jButton29.setVisible(false);
                this.jButton30.setVisible(false);
                this.jButton31.setVisible(false);
                this.jButton32.setVisible(false);
                this.jButton33.setVisible(false);
                this.jButton34.setVisible(false);
                this.jButton35.setVisible(false);
                this.jButton36.setVisible(false);
                this.jButton37.setVisible(false);
                this.jButton38.setVisible(false);
                this.jButton39.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton41.setVisible(false);
                this.jButton42.setVisible(false);
                this.jButton43.setVisible(false);
                this.jButton44.setVisible(false);
                this.jButton45.setVisible(false);
                this.jButton46.setVisible(false);
                this.jButton47.setVisible(false);
                this.jButton48.setVisible(false);
                this.jButton49.setVisible(false);
                this.jButton50.setVisible(false);
                this.jButton51.setVisible(false);
                this.jButton52.setVisible(false);
                this.jButton53.setVisible(false);
                this.jButton54.setVisible(false);
                this.jButton55.setVisible(false);
                break;
            case 11:
                this.jButton17.setVisible(false);
                this.jButton12.setVisible(false);
                this.jButton13.setVisible(false);
                this.jButton14.setVisible(false);
                this.jButton15.setVisible(false);
                this.jButton16.setVisible(false);
                this.jButton18.setVisible(false);
                this.jButton19.setVisible(false);
                this.jButton20.setVisible(false);
                this.jButton21.setVisible(false);
                this.jButton22.setVisible(false);
                this.jButton23.setVisible(false);
                this.jButton24.setVisible(false);
                this.jButton25.setVisible(false);
                this.jButton26.setVisible(false);
                this.jButton27.setVisible(false);
                this.jButton28.setVisible(false);
                this.jButton29.setVisible(false);
                this.jButton30.setVisible(false);
                this.jButton31.setVisible(false);
                this.jButton32.setVisible(false);
                this.jButton33.setVisible(false);
                this.jButton34.setVisible(false);
                this.jButton35.setVisible(false);
                this.jButton36.setVisible(false);
                this.jButton37.setVisible(false);
                this.jButton38.setVisible(false);
                this.jButton39.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton41.setVisible(false);
                this.jButton42.setVisible(false);
                this.jButton43.setVisible(false);
                this.jButton44.setVisible(false);
                this.jButton45.setVisible(false);
                this.jButton46.setVisible(false);
                this.jButton47.setVisible(false);
                this.jButton48.setVisible(false);
                this.jButton49.setVisible(false);
                this.jButton50.setVisible(false);
                this.jButton51.setVisible(false);
                this.jButton52.setVisible(false);
                this.jButton53.setVisible(false);
                this.jButton54.setVisible(false);
                this.jButton55.setVisible(false);
                break;
            case 10:
                this.jButton17.setVisible(false);
                this.jButton11.setVisible(false);
                this.jButton12.setVisible(false);
                this.jButton13.setVisible(false);
                this.jButton14.setVisible(false);
                this.jButton15.setVisible(false);
                this.jButton16.setVisible(false);
                this.jButton18.setVisible(false);
                this.jButton19.setVisible(false);
                this.jButton20.setVisible(false);
                this.jButton21.setVisible(false);
                this.jButton22.setVisible(false);
                this.jButton23.setVisible(false);
                this.jButton24.setVisible(false);
                this.jButton25.setVisible(false);
                this.jButton26.setVisible(false);
                this.jButton27.setVisible(false);
                this.jButton28.setVisible(false);
                this.jButton29.setVisible(false);
                this.jButton30.setVisible(false);
                this.jButton31.setVisible(false);
                this.jButton32.setVisible(false);
                this.jButton33.setVisible(false);
                this.jButton34.setVisible(false);
                this.jButton35.setVisible(false);
                this.jButton36.setVisible(false);
                this.jButton37.setVisible(false);
                this.jButton38.setVisible(false);
                this.jButton39.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton41.setVisible(false);
                this.jButton42.setVisible(false);
                this.jButton43.setVisible(false);
                this.jButton44.setVisible(false);
                this.jButton45.setVisible(false);
                this.jButton46.setVisible(false);
                this.jButton47.setVisible(false);
                this.jButton48.setVisible(false);
                this.jButton49.setVisible(false);
                this.jButton50.setVisible(false);
                this.jButton51.setVisible(false);
                this.jButton52.setVisible(false);
                this.jButton53.setVisible(false);
                this.jButton54.setVisible(false);
                this.jButton55.setVisible(false);
                break;
            case 9:
                this.jButton17.setVisible(false);
                this.jButton10.setVisible(false);
                this.jButton11.setVisible(false);
                this.jButton12.setVisible(false);
                this.jButton13.setVisible(false);
                this.jButton14.setVisible(false);
                this.jButton15.setVisible(false);
                this.jButton16.setVisible(false);
                this.jButton18.setVisible(false);
                this.jButton19.setVisible(false);
                this.jButton20.setVisible(false);
                this.jButton21.setVisible(false);
                this.jButton22.setVisible(false);
                this.jButton23.setVisible(false);
                this.jButton24.setVisible(false);
                this.jButton25.setVisible(false);
                this.jButton26.setVisible(false);
                this.jButton27.setVisible(false);
                this.jButton28.setVisible(false);
                this.jButton29.setVisible(false);
                this.jButton30.setVisible(false);
                this.jButton31.setVisible(false);
                this.jButton32.setVisible(false);
                this.jButton33.setVisible(false);
                this.jButton34.setVisible(false);
                this.jButton35.setVisible(false);
                this.jButton36.setVisible(false);
                this.jButton37.setVisible(false);
                this.jButton38.setVisible(false);
                this.jButton39.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton41.setVisible(false);
                this.jButton42.setVisible(false);
                this.jButton43.setVisible(false);
                this.jButton44.setVisible(false);
                this.jButton45.setVisible(false);
                this.jButton46.setVisible(false);
                this.jButton47.setVisible(false);
                this.jButton48.setVisible(false);
                this.jButton49.setVisible(false);
                this.jButton50.setVisible(false);
                this.jButton51.setVisible(false);
                this.jButton52.setVisible(false);
                this.jButton53.setVisible(false);
                this.jButton54.setVisible(false);
                this.jButton55.setVisible(false);
                break;
            case 8:
                this.jButton17.setVisible(false);
                this.jButton9.setVisible(false);
                this.jButton10.setVisible(false);
                this.jButton11.setVisible(false);
                this.jButton12.setVisible(false);
                this.jButton13.setVisible(false);
                this.jButton14.setVisible(false);
                this.jButton15.setVisible(false);
                this.jButton16.setVisible(false);
                this.jButton18.setVisible(false);
                this.jButton19.setVisible(false);
                this.jButton20.setVisible(false);
                this.jButton21.setVisible(false);
                this.jButton22.setVisible(false);
                this.jButton23.setVisible(false);
                this.jButton24.setVisible(false);
                this.jButton25.setVisible(false);
                this.jButton26.setVisible(false);
                this.jButton27.setVisible(false);
                this.jButton28.setVisible(false);
                this.jButton29.setVisible(false);
                this.jButton30.setVisible(false);
                this.jButton31.setVisible(false);
                this.jButton32.setVisible(false);
                this.jButton33.setVisible(false);
                this.jButton34.setVisible(false);
                this.jButton35.setVisible(false);
                this.jButton36.setVisible(false);
                this.jButton37.setVisible(false);
                this.jButton38.setVisible(false);
                this.jButton39.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton41.setVisible(false);
                this.jButton42.setVisible(false);
                this.jButton43.setVisible(false);
                this.jButton44.setVisible(false);
                this.jButton45.setVisible(false);
                this.jButton46.setVisible(false);
                this.jButton47.setVisible(false);
                this.jButton48.setVisible(false);
                this.jButton49.setVisible(false);
                this.jButton50.setVisible(false);
                this.jButton51.setVisible(false);
                this.jButton52.setVisible(false);
                this.jButton53.setVisible(false);
                this.jButton54.setVisible(false);
                this.jButton55.setVisible(false);
                break;
            case 7:
                this.jButton17.setVisible(false);
                this.jButton8.setVisible(false);
                this.jButton9.setVisible(false);
                this.jButton10.setVisible(false);
                this.jButton11.setVisible(false);
                this.jButton12.setVisible(false);
                this.jButton13.setVisible(false);
                this.jButton14.setVisible(false);
                this.jButton15.setVisible(false);
                this.jButton16.setVisible(false);
                this.jButton18.setVisible(false);
                this.jButton19.setVisible(false);
                this.jButton20.setVisible(false);
                this.jButton21.setVisible(false);
                this.jButton22.setVisible(false);
                this.jButton23.setVisible(false);
                this.jButton24.setVisible(false);
                this.jButton25.setVisible(false);
                this.jButton26.setVisible(false);
                this.jButton27.setVisible(false);
                this.jButton28.setVisible(false);
                this.jButton29.setVisible(false);
                this.jButton30.setVisible(false);
                this.jButton31.setVisible(false);
                this.jButton32.setVisible(false);
                this.jButton33.setVisible(false);
                this.jButton34.setVisible(false);
                this.jButton35.setVisible(false);
                this.jButton36.setVisible(false);
                this.jButton37.setVisible(false);
                this.jButton38.setVisible(false);
                this.jButton39.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton41.setVisible(false);
                this.jButton42.setVisible(false);
                this.jButton43.setVisible(false);
                this.jButton44.setVisible(false);
                this.jButton45.setVisible(false);
                this.jButton46.setVisible(false);
                this.jButton47.setVisible(false);
                this.jButton48.setVisible(false);
                this.jButton49.setVisible(false);
                this.jButton50.setVisible(false);
                this.jButton51.setVisible(false);
                this.jButton52.setVisible(false);
                this.jButton53.setVisible(false);
                this.jButton54.setVisible(false);
                this.jButton55.setVisible(false);
                break;
            case 6:
                this.jButton17.setVisible(false);
                this.jButton7.setVisible(false);
                this.jButton8.setVisible(false);
                this.jButton9.setVisible(false);
                this.jButton10.setVisible(false);
                this.jButton11.setVisible(false);
                this.jButton12.setVisible(false);
                this.jButton13.setVisible(false);
                this.jButton14.setVisible(false);
                this.jButton15.setVisible(false);
                this.jButton16.setVisible(false);
                this.jButton18.setVisible(false);
                this.jButton19.setVisible(false);
                this.jButton20.setVisible(false);
                this.jButton21.setVisible(false);
                this.jButton22.setVisible(false);
                this.jButton23.setVisible(false);
                this.jButton24.setVisible(false);
                this.jButton25.setVisible(false);
                this.jButton26.setVisible(false);
                this.jButton27.setVisible(false);
                this.jButton28.setVisible(false);
                this.jButton29.setVisible(false);
                this.jButton30.setVisible(false);
                this.jButton31.setVisible(false);
                this.jButton32.setVisible(false);
                this.jButton33.setVisible(false);
                this.jButton34.setVisible(false);
                this.jButton35.setVisible(false);
                this.jButton36.setVisible(false);
                this.jButton37.setVisible(false);
                this.jButton38.setVisible(false);
                this.jButton39.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton41.setVisible(false);
                this.jButton42.setVisible(false);
                this.jButton43.setVisible(false);
                this.jButton44.setVisible(false);
                this.jButton45.setVisible(false);
                this.jButton46.setVisible(false);
                this.jButton47.setVisible(false);
                this.jButton48.setVisible(false);
                this.jButton49.setVisible(false);
                this.jButton50.setVisible(false);
                this.jButton51.setVisible(false);
                this.jButton52.setVisible(false);
                this.jButton53.setVisible(false);
                this.jButton54.setVisible(false);
                this.jButton55.setVisible(false);
                break;
            case 5:
                this.jButton17.setVisible(false);
                this.jButton6.setVisible(false);
                this.jButton7.setVisible(false);
                this.jButton8.setVisible(false);
                this.jButton9.setVisible(false);
                this.jButton10.setVisible(false);
                this.jButton11.setVisible(false);
                this.jButton12.setVisible(false);
                this.jButton13.setVisible(false);
                this.jButton14.setVisible(false);
                this.jButton15.setVisible(false);
                this.jButton16.setVisible(false);
                this.jButton18.setVisible(false);
                this.jButton19.setVisible(false);
                this.jButton20.setVisible(false);
                this.jButton21.setVisible(false);
                this.jButton22.setVisible(false);
                this.jButton23.setVisible(false);
                this.jButton24.setVisible(false);
                this.jButton25.setVisible(false);
                this.jButton26.setVisible(false);
                this.jButton27.setVisible(false);
                this.jButton28.setVisible(false);
                this.jButton29.setVisible(false);
                this.jButton30.setVisible(false);
                this.jButton31.setVisible(false);
                this.jButton32.setVisible(false);
                this.jButton33.setVisible(false);
                this.jButton34.setVisible(false);
                this.jButton35.setVisible(false);
                this.jButton36.setVisible(false);
                this.jButton37.setVisible(false);
                this.jButton38.setVisible(false);
                this.jButton39.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton41.setVisible(false);
                this.jButton42.setVisible(false);
                this.jButton43.setVisible(false);
                this.jButton44.setVisible(false);
                this.jButton45.setVisible(false);
                this.jButton46.setVisible(false);
                this.jButton47.setVisible(false);
                this.jButton48.setVisible(false);
                this.jButton49.setVisible(false);
                this.jButton50.setVisible(false);
                this.jButton51.setVisible(false);
                this.jButton52.setVisible(false);
                this.jButton53.setVisible(false);
                this.jButton54.setVisible(false);
                this.jButton55.setVisible(false);
                break;
            case 4:
                this.jButton17.setVisible(false);
                this.jButton5.setVisible(false);
                this.jButton6.setVisible(false);
                this.jButton7.setVisible(false);
                this.jButton8.setVisible(false);
                this.jButton9.setVisible(false);
                this.jButton10.setVisible(false);
                this.jButton11.setVisible(false);
                this.jButton12.setVisible(false);
                this.jButton13.setVisible(false);
                this.jButton14.setVisible(false);
                this.jButton15.setVisible(false);
                this.jButton16.setVisible(false);
                this.jButton18.setVisible(false);
                this.jButton19.setVisible(false);
                this.jButton20.setVisible(false);
                this.jButton21.setVisible(false);
                this.jButton22.setVisible(false);
                this.jButton23.setVisible(false);
                this.jButton24.setVisible(false);
                this.jButton25.setVisible(false);
                this.jButton26.setVisible(false);
                this.jButton27.setVisible(false);
                this.jButton28.setVisible(false);
                this.jButton29.setVisible(false);
                this.jButton30.setVisible(false);
                this.jButton31.setVisible(false);
                this.jButton32.setVisible(false);
                this.jButton33.setVisible(false);
                this.jButton34.setVisible(false);
                this.jButton35.setVisible(false);
                this.jButton36.setVisible(false);
                this.jButton37.setVisible(false);
                this.jButton38.setVisible(false);
                this.jButton39.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton41.setVisible(false);
                this.jButton42.setVisible(false);
                this.jButton43.setVisible(false);
                this.jButton44.setVisible(false);
                this.jButton45.setVisible(false);
                this.jButton46.setVisible(false);
                this.jButton47.setVisible(false);
                this.jButton48.setVisible(false);
                this.jButton49.setVisible(false);
                this.jButton50.setVisible(false);
                this.jButton51.setVisible(false);
                this.jButton52.setVisible(false);
                this.jButton53.setVisible(false);
                this.jButton54.setVisible(false);
                this.jButton55.setVisible(false);
                break;
            case 3:
                this.jButton17.setVisible(false);
                this.jButton4.setVisible(false);
                this.jButton5.setVisible(false);
                this.jButton6.setVisible(false);
                this.jButton7.setVisible(false);
                this.jButton8.setVisible(false);
                this.jButton9.setVisible(false);
                this.jButton10.setVisible(false);
                this.jButton11.setVisible(false);
                this.jButton12.setVisible(false);
                this.jButton13.setVisible(false);
                this.jButton14.setVisible(false);
                this.jButton15.setVisible(false);
                this.jButton16.setVisible(false);
                this.jButton18.setVisible(false);
                this.jButton19.setVisible(false);
                this.jButton20.setVisible(false);
                this.jButton21.setVisible(false);
                this.jButton22.setVisible(false);
                this.jButton23.setVisible(false);
                this.jButton24.setVisible(false);
                this.jButton25.setVisible(false);
                this.jButton26.setVisible(false);
                this.jButton27.setVisible(false);
                this.jButton28.setVisible(false);
                this.jButton29.setVisible(false);
                this.jButton30.setVisible(false);
                this.jButton31.setVisible(false);
                this.jButton32.setVisible(false);
                this.jButton33.setVisible(false);
                this.jButton34.setVisible(false);
                this.jButton35.setVisible(false);
                this.jButton36.setVisible(false);
                this.jButton37.setVisible(false);
                this.jButton38.setVisible(false);
                this.jButton39.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton41.setVisible(false);
                this.jButton42.setVisible(false);
                this.jButton43.setVisible(false);
                this.jButton44.setVisible(false);
                this.jButton45.setVisible(false);
                this.jButton46.setVisible(false);
                this.jButton47.setVisible(false);
                this.jButton48.setVisible(false);
                this.jButton49.setVisible(false);
                this.jButton50.setVisible(false);
                this.jButton51.setVisible(false);
                this.jButton52.setVisible(false);
                this.jButton53.setVisible(false);
                this.jButton54.setVisible(false);
                this.jButton55.setVisible(false);
                break;
            case 2:
                this.jButton17.setVisible(false);
                this.jButton3.setVisible(false);
                this.jButton4.setVisible(false);
                this.jButton5.setVisible(false);
                this.jButton6.setVisible(false);
                this.jButton7.setVisible(false);
                this.jButton8.setVisible(false);
                this.jButton9.setVisible(false);
                this.jButton10.setVisible(false);
                this.jButton11.setVisible(false);
                this.jButton12.setVisible(false);
                this.jButton13.setVisible(false);
                this.jButton14.setVisible(false);
                this.jButton15.setVisible(false);
                this.jButton16.setVisible(false);
                this.jButton18.setVisible(false);
                this.jButton19.setVisible(false);
                this.jButton20.setVisible(false);
                this.jButton21.setVisible(false);
                this.jButton22.setVisible(false);
                this.jButton23.setVisible(false);
                this.jButton24.setVisible(false);
                this.jButton25.setVisible(false);
                this.jButton26.setVisible(false);
                this.jButton27.setVisible(false);
                this.jButton28.setVisible(false);
                this.jButton29.setVisible(false);
                this.jButton30.setVisible(false);
                this.jButton31.setVisible(false);
                this.jButton32.setVisible(false);
                this.jButton33.setVisible(false);
                this.jButton34.setVisible(false);
                this.jButton35.setVisible(false);
                this.jButton36.setVisible(false);
                this.jButton37.setVisible(false);
                this.jButton38.setVisible(false);
                this.jButton39.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton41.setVisible(false);
                this.jButton42.setVisible(false);
                this.jButton43.setVisible(false);
                this.jButton44.setVisible(false);
                this.jButton45.setVisible(false);
                this.jButton46.setVisible(false);
                this.jButton47.setVisible(false);
                this.jButton48.setVisible(false);
                this.jButton49.setVisible(false);
                this.jButton50.setVisible(false);
                this.jButton51.setVisible(false);
                this.jButton52.setVisible(false);
                this.jButton53.setVisible(false);
                this.jButton54.setVisible(false);
                this.jButton55.setVisible(false);
                break;
            case 1:
                this.jButton17.setVisible(false);
                this.jButton2.setVisible(false);
                this.jButton3.setVisible(false);
                this.jButton4.setVisible(false);
                this.jButton5.setVisible(false);
                this.jButton6.setVisible(false);
                this.jButton7.setVisible(false);
                this.jButton8.setVisible(false);
                this.jButton9.setVisible(false);
                this.jButton10.setVisible(false);
                this.jButton11.setVisible(false);
                this.jButton12.setVisible(false);
                this.jButton13.setVisible(false);
                this.jButton14.setVisible(false);
                this.jButton15.setVisible(false);
                this.jButton16.setVisible(false);
                this.jButton18.setVisible(false);
                this.jButton19.setVisible(false);
                this.jButton20.setVisible(false);
                this.jButton21.setVisible(false);
                this.jButton22.setVisible(false);
                this.jButton23.setVisible(false);
                this.jButton24.setVisible(false);
                this.jButton25.setVisible(false);
                this.jButton26.setVisible(false);
                this.jButton27.setVisible(false);
                this.jButton28.setVisible(false);
                this.jButton29.setVisible(false);
                this.jButton30.setVisible(false);
                this.jButton31.setVisible(false);
                this.jButton32.setVisible(false);
                this.jButton33.setVisible(false);
                this.jButton34.setVisible(false);
                this.jButton35.setVisible(false);
                this.jButton36.setVisible(false);
                this.jButton37.setVisible(false);
                this.jButton38.setVisible(false);
                this.jButton39.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton40.setVisible(false);
                this.jButton41.setVisible(false);
                this.jButton42.setVisible(false);
                this.jButton43.setVisible(false);
                this.jButton44.setVisible(false);
                this.jButton45.setVisible(false);
                this.jButton46.setVisible(false);
                this.jButton47.setVisible(false);
                this.jButton48.setVisible(false);
                this.jButton49.setVisible(false);
                this.jButton50.setVisible(false);
                this.jButton51.setVisible(false);
                this.jButton52.setVisible(false);
                this.jButton53.setVisible(false);
                this.jButton54.setVisible(false);
                this.jButton55.setVisible(false);
                break;
        }

        ResultSet rs = VeDAO.GheDaDat(xc.getMaXC());
        while (rs.next()) {
            int soghedadat = rs.getInt("SoGhe");
            if (soghedadat == 1) {
                this.jButton1.setBackground(Color.red);
            } else if (soghedadat == 2) {
                this.jButton2.setBackground(Color.red);
            } else if (soghedadat == 3) {
                this.jButton3.setBackground(Color.red);
            } else if (soghedadat == 4) {
                this.jButton4.setBackground(Color.red);
            } else if (soghedadat == 5) {
                this.jButton5.setBackground(Color.red);
            } else if (soghedadat == 6) {
                this.jButton6.setBackground(Color.red);
            } else if (soghedadat == 7) {
                this.jButton7.setBackground(Color.red);
            } else if (soghedadat == 8) {
                this.jButton8.setBackground(Color.red);
            } else if (soghedadat == 9) {
                this.jButton9.setBackground(Color.red);
            } else if (soghedadat == 10) {
                this.jButton10.setBackground(Color.red);
            } else if (soghedadat == 11) {
                this.jButton11.setBackground(Color.red);
            } else if (soghedadat == 12) {
                this.jButton12.setBackground(Color.red);
            } else if (soghedadat == 13) {
                this.jButton13.setBackground(Color.red);
            } else if (soghedadat == 14) {
                this.jButton14.setBackground(Color.red);
            } else if (soghedadat == 15) {
                this.jButton15.setBackground(Color.red);
            } else if (soghedadat == 16) {
                this.jButton16.setBackground(Color.red);
            } else if (soghedadat == 17) {
                this.jButton17.setBackground(Color.red);
            } else if (soghedadat == 18) {
                this.jButton18.setBackground(Color.red);
            } else if (soghedadat == 19) {
                this.jButton19.setBackground(Color.red);
            } else if (soghedadat == 20) {
                this.jButton20.setBackground(Color.red);
            } else if (soghedadat == 21) {
                this.jButton21.setBackground(Color.red);
            } else if (soghedadat == 22) {
                this.jButton22.setBackground(Color.red);
            } else if (soghedadat == 23) {
                this.jButton23.setBackground(Color.red);
            } else if (soghedadat == 24) {
                this.jButton24.setBackground(Color.red);
            } else if (soghedadat == 25) {
                this.jButton25.setBackground(Color.red);
            } else if (soghedadat == 26) {
                this.jButton26.setBackground(Color.red);
            } else if (soghedadat == 27) {
                this.jButton27.setBackground(Color.red);
            } else if (soghedadat == 28) {
                this.jButton28.setBackground(Color.red);
            } else if (soghedadat == 29) {
                this.jButton29.setBackground(Color.red);
            } else if (soghedadat == 30) {
                this.jButton30.setBackground(Color.red);
            } else if (soghedadat == 31) {
                this.jButton31.setBackground(Color.red);
            } else if (soghedadat == 32) {
                this.jButton32.setBackground(Color.red);
            } else if (soghedadat == 33) {
                this.jButton33.setBackground(Color.red);
            } else if (soghedadat == 34) {
                this.jButton34.setBackground(Color.red);
            } else if (soghedadat == 35) {
                this.jButton35.setBackground(Color.red);
            } else if (soghedadat == 36) {
                this.jButton36.setBackground(Color.red);
            } else if (soghedadat == 37) {
                this.jButton37.setBackground(Color.red);
            } else if (soghedadat == 38) {
                this.jButton38.setBackground(Color.red);
            } else if (soghedadat == 39) {
                this.jButton39.setBackground(Color.red);
            } else if (soghedadat == 40) {
                this.jButton40.setBackground(Color.red);
            } else if (soghedadat == 41) {
                this.jButton41.setBackground(Color.red);
            } else if (soghedadat == 42) {
                this.jButton42.setBackground(Color.red);
            } else if (soghedadat == 43) {
                this.jButton43.setBackground(Color.red);
            } else if (soghedadat == 44) {
                this.jButton44.setBackground(Color.red);
            } else if (soghedadat == 45) {
                this.jButton45.setBackground(Color.red);
            } else if (soghedadat == 46) {
                this.jButton46.setBackground(Color.red);
            } else if (soghedadat == 47) {
                this.jButton47.setBackground(Color.red);
            } else if (soghedadat == 48) {
                this.jButton48.setBackground(Color.red);
            } else if (soghedadat == 49) {
                this.jButton49.setBackground(Color.red);
            } else if (soghedadat == 50) {
                this.jButton50.setBackground(Color.red);
            } else if (soghedadat == 51) {
                this.jButton51.setBackground(Color.red);
            } else if (soghedadat == 52) {
                this.jButton52.setBackground(Color.red);
            } else if (soghedadat == 53) {
                this.jButton53.setBackground(Color.red);
            } else if (soghedadat == 54) {
                this.jButton54.setBackground(Color.red);
            } else if (soghedadat == 55) {
                this.jButton55.setBackground(Color.red);
            }
        }
    } catch (Exception ex) {
    }
}//GEN-LAST:event_jlstXuatChieuValueChanged
// </editor-fold>

 // <editor-fold defaultstate="collapsed" desc="Sự kiện chọn Phim">
private void jlstPhimValueChanged(javax.swing.event.ListSelectionEvent evt) {//GEN-FIRST:event_jlstPhimValueChanged
// TODO add your handling code here:
    PhimPoJo ph = (PhimPoJo) this.jlstPhim.getSelectedValue();

    DefaultListModel lstXuatChieu = new DefaultListModel();
    this.jlstXuatChieu.setModel(lstXuatChieu);
    try {
        ResultSet rs = XuatChieuDAO.LayBangXuatChieuTheoMaPhimHoa(ph.getMaPhim());
        while (rs.next()) {
            XuatChieuPoJo xc = new XuatChieuPoJo();
            xc.setMaXC(rs.getInt("MaXC"));
            xc.setNgayChieu(rs.getDate("NgayChieu"));
            xc.setGioChieu(rs.getTime("GioChieu"));
            xc.setMaPhim(rs.getNString("MaPhim"));
            xc.setMaPhong(rs.getString("MaPhong"));

            lstXuatChieu.addElement(xc);
            //dl.addElement(rs.getString("TenPhim"));                
        }
        jlstXuatChieu.setEnabled(true);
        MySQLDataAccessHelper helper = new MySQLDataAccessHelper();
        helper.Close();
    } catch (Exception ex) {
    }
}//GEN-LAST:event_jlstPhimValueChanged
// </editor-fold>

 // <editor-fold defaultstate="collapsed" desc="Sự kiện click button đặt hoặc hủy vé">
private void jButton7ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton7ActionPerformed
// TODO add your handling code here:
    XuatChieuPoJo xc = new XuatChieuPoJo();
    xc = (XuatChieuPoJo) this.jlstXuatChieu.getSelectedValue();
    int kq = DatVe(7, xc.getMaXC(), "NV1");
    if (kq == 1) {
        this.jButton7.setBackground(Color.red);
    } else {
        this.jButton7.setBackground(Color.gray);
    }
}//GEN-LAST:event_jButton7ActionPerformed

private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
// TODO add your handling code here:
    XuatChieuPoJo xc = new XuatChieuPoJo();
    xc = (XuatChieuPoJo) this.jlstXuatChieu.getSelectedValue();
    int kq = DatVe(2, xc.getMaXC(), "NV1");
    if (kq == 1) {
        this.jButton2.setBackground(Color.red);
    } else {
        this.jButton2.setBackground(Color.gray);
    }
}//GEN-LAST:event_jButton2ActionPerformed

private void jButton10ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton10ActionPerformed
// TODO add your handling code here:
    XuatChieuPoJo xc = new XuatChieuPoJo();
    xc = (XuatChieuPoJo) this.jlstXuatChieu.getSelectedValue();
    int kq = DatVe(10, xc.getMaXC(), "NV1");
    if (kq == 1) {
        this.jButton10.setBackground(Color.red);
    } else {
        this.jButton10.setBackground(Color.gray);
    }
}//GEN-LAST:event_jButton10ActionPerformed

private void jButton11ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton11ActionPerformed
// TODO add your handling code here:
    XuatChieuPoJo xc = new XuatChieuPoJo();
    xc = (XuatChieuPoJo) this.jlstXuatChieu.getSelectedValue();
    int kq = DatVe(11, xc.getMaXC(), "NV1");
    if (kq == 1) {
        this.jButton11.setBackground(Color.red);
    } else {
        this.jButton11.setBackground(Color.gray);
    }
}//GEN-LAST:event_jButton11ActionPerformed

private void jButton12ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton12ActionPerformed
// TODO add your handling code here:
    XuatChieuPoJo xc = new XuatChieuPoJo();
    xc = (XuatChieuPoJo) this.jlstXuatChieu.getSelectedValue();
    int kq = DatVe(12, xc.getMaXC(), "NV1");
    if (kq == 1) {
        this.jButton12.setBackground(Color.red);
    } else {
        this.jButton12.setBackground(Color.gray);
    }
}//GEN-LAST:event_jButton12ActionPerformed

private void jButton13ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton13ActionPerformed
// TODO add your handling code here:
    XuatChieuPoJo xc = new XuatChieuPoJo();
    xc = (XuatChieuPoJo) this.jlstXuatChieu.getSelectedValue();
    int kq = DatVe(13, xc.getMaXC(), "NV1");
    if (kq == 1) {
        this.jButton13.setBackground(Color.red);
    } else {
        this.jButton13.setBackground(Color.gray);
    }
}//GEN-LAST:event_jButton13ActionPerformed

private void jButton14ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton14ActionPerformed
// TODO add your handling code here:
    XuatChieuPoJo xc = new XuatChieuPoJo();
    xc = (XuatChieuPoJo) this.jlstXuatChieu.getSelectedValue();
    int kq = DatVe(14, xc.getMaXC(), "NV1");
    if (kq == 1) {
        this.jButton14.setBackground(Color.red);
    } else {
        this.jButton14.setBackground(Color.gray);
    }
}//GEN-LAST:event_jButton14ActionPerformed

private void jButton15ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton15ActionPerformed
// TODO add your handling code here:
    XuatChieuPoJo xc = new XuatChieuPoJo();
    xc = (XuatChieuPoJo) this.jlstXuatChieu.getSelectedValue();
    int kq = DatVe(15, xc.getMaXC(), "NV1");
    if (kq == 1) {
        this.jButton15.setBackground(Color.red);
    } else {
        this.jButton15.setBackground(Color.gray);
    }
}//GEN-LAST:event_jButton15ActionPerformed

private void jButton16ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton16ActionPerformed
// TODO add your handling code here:
    XuatChieuPoJo xc = new XuatChieuPoJo();
    xc = (XuatChieuPoJo) this.jlstXuatChieu.getSelectedValue();
    int kq = DatVe(16, xc.getMaXC(), "NV1");
    if (kq == 1) {
        this.jButton16.setBackground(Color.red);
    } else {
        this.jButton16.setBackground(Color.gray);
    }
}//GEN-LAST:event_jButton16ActionPerformed

private void jButton17ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton17ActionPerformed
// TODO add your handling code here:
    XuatChieuPoJo xc = new XuatChieuPoJo();
    xc = (XuatChieuPoJo) this.jlstXuatChieu.getSelectedValue();
    int kq = DatVe(17, xc.getMaXC(), "NV1");
    if (kq == 1) {
        this.jButton17.setBackground(Color.red);
    } else {
        this.jButton17.setBackground(Color.gray);
    }
}//GEN-LAST:event_jButton17ActionPerformed

private void jButton18ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton18ActionPerformed
// TODO add your handling code here:
    XuatChieuPoJo xc = new XuatChieuPoJo();
    xc = (XuatChieuPoJo) this.jlstXuatChieu.getSelectedValue();
    int kq = DatVe(18, xc.getMaXC(), "NV1");
    if (kq == 1) {
        this.jButton18.setBackground(Color.red);
    } else {
        this.jButton18.setBackground(Color.gray);
    }
}//GEN-LAST:event_jButton18ActionPerformed

private void jButton19ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton19ActionPerformed
// TODO add your handling code here:
    XuatChieuPoJo xc = new XuatChieuPoJo();
    xc = (XuatChieuPoJo) this.jlstXuatChieu.getSelectedValue();
    int kq = DatVe(19, xc.getMaXC(), "NV1");
    if (kq == 1) {
        this.jButton19.setBackground(Color.red);
    } else {
        this.jButton19.setBackground(Color.gray);
    }
}//GEN-LAST:event_jButton19ActionPerformed

private void jButton20ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton20ActionPerformed
// TODO add your handling code here:
    XuatChieuPoJo xc = new XuatChieuPoJo();
    xc = (XuatChieuPoJo) this.jlstXuatChieu.getSelectedValue();
    int kq = DatVe(20, xc.getMaXC(), "NV1");
    if (kq == 1) {
        this.jButton20.setBackground(Color.red);
    } else {
        this.jButton20.setBackground(Color.gray);
    }
}//GEN-LAST:event_jButton20ActionPerformed

private void jButton21ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton21ActionPerformed
// TODO add your handling code here:
    XuatChieuPoJo xc = new XuatChieuPoJo();
    xc = (XuatChieuPoJo) this.jlstXuatChieu.getSelectedValue();
    int kq = DatVe(21, xc.getMaXC(), "NV1");
    if (kq == 1) {
        this.jButton21.setBackground(Color.red);
    } else {
        this.jButton21.setBackground(Color.gray);
    }
}//GEN-LAST:event_jButton21ActionPerformed

private void jButton22ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton22ActionPerformed
// TODO add your handling code here:
    XuatChieuPoJo xc = new XuatChieuPoJo();
    xc = (XuatChieuPoJo) this.jlstXuatChieu.getSelectedValue();
    int kq = DatVe(22, xc.getMaXC(), "NV1");
    if (kq == 1) {
        this.jButton22.setBackground(Color.red);
    } else {
        this.jButton22.setBackground(Color.gray);
    }
}//GEN-LAST:event_jButton22ActionPerformed

private void jButton23ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton23ActionPerformed
// TODO add your handling code here:
    XuatChieuPoJo xc = new XuatChieuPoJo();
    xc = (XuatChieuPoJo) this.jlstXuatChieu.getSelectedValue();
    int kq = DatVe(23, xc.getMaXC(), "NV1");
    if (kq == 1) {
        this.jButton23.setBackground(Color.red);
    } else {
        this.jButton23.setBackground(Color.gray);
    }
}//GEN-LAST:event_jButton23ActionPerformed

private void jButton24ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton24ActionPerformed
// TODO add your handling code here:
    XuatChieuPoJo xc = new XuatChieuPoJo();
    xc = (XuatChieuPoJo) this.jlstXuatChieu.getSelectedValue();
    int kq = DatVe(24, xc.getMaXC(), "NV1");
    if (kq == 1) {
        this.jButton24.setBackground(Color.red);
    } else {
        this.jButton24.setBackground(Color.gray);
    }
}//GEN-LAST:event_jButton24ActionPerformed

private void jButton25ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton25ActionPerformed
// TODO add your handling code here:
    XuatChieuPoJo xc = new XuatChieuPoJo();
    xc = (XuatChieuPoJo) this.jlstXuatChieu.getSelectedValue();
    int kq = DatVe(25, xc.getMaXC(), "NV1");
    if (kq == 1) {
        this.jButton25.setBackground(Color.red);
    } else {
        this.jButton25.setBackground(Color.gray);
    }
}//GEN-LAST:event_jButton25ActionPerformed

private void jButton26ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton26ActionPerformed
// TODO add your handling code here:
    XuatChieuPoJo xc = new XuatChieuPoJo();
    xc = (XuatChieuPoJo) this.jlstXuatChieu.getSelectedValue();
    int kq = DatVe(26, xc.getMaXC(), "NV1");
    if (kq == 1) {
        this.jButton26.setBackground(Color.red);
    } else {
        this.jButton26.setBackground(Color.gray);
    }
}//GEN-LAST:event_jButton26ActionPerformed

private void jButton27ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton27ActionPerformed
// TODO add your handling code here:
    XuatChieuPoJo xc = new XuatChieuPoJo();
    xc = (XuatChieuPoJo) this.jlstXuatChieu.getSelectedValue();
    int kq = DatVe(27, xc.getMaXC(), "NV1");
    if (kq == 1) {
        this.jButton27.setBackground(Color.red);
    } else {
        this.jButton27.setBackground(Color.gray);
    }
}//GEN-LAST:event_jButton27ActionPerformed

private void jButton28ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton28ActionPerformed
// TODO add your handling code here:
    XuatChieuPoJo xc = new XuatChieuPoJo();
    xc = (XuatChieuPoJo) this.jlstXuatChieu.getSelectedValue();
    int kq = DatVe(28, xc.getMaXC(), "NV1");
    if (kq == 1) {
        this.jButton28.setBackground(Color.red);
    } else {
        this.jButton28.setBackground(Color.gray);
    }
}//GEN-LAST:event_jButton28ActionPerformed

private void jButton29ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton29ActionPerformed
// TODO add your handling code here:
    XuatChieuPoJo xc = new XuatChieuPoJo();
    xc = (XuatChieuPoJo) this.jlstXuatChieu.getSelectedValue();
    int kq = DatVe(29, xc.getMaXC(), "NV1");
    if (kq == 1) {
        this.jButton29.setBackground(Color.red);
    } else {
        this.jButton29.setBackground(Color.gray);
    }
}//GEN-LAST:event_jButton29ActionPerformed

private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
// TODO add your handling code here:
    XuatChieuPoJo xc = new XuatChieuPoJo();
    xc = (XuatChieuPoJo) this.jlstXuatChieu.getSelectedValue();
    int kq = DatVe(3, xc.getMaXC(), "NV1");
    if (kq == 1) {
        this.jButton3.setBackground(Color.red);
    } else {
        this.jButton3.setBackground(Color.gray);
    }
}//GEN-LAST:event_jButton3ActionPerformed

private void jButton30ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton30ActionPerformed
// TODO add your handling code here:
    XuatChieuPoJo xc = new XuatChieuPoJo();
    xc = (XuatChieuPoJo) this.jlstXuatChieu.getSelectedValue();
    int kq = DatVe(30, xc.getMaXC(), "NV1");
    if (kq == 1) {
        this.jButton30.setBackground(Color.red);
    } else {
        this.jButton30.setBackground(Color.gray);
    }
}//GEN-LAST:event_jButton30ActionPerformed

private void jButton31ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton31ActionPerformed
// TODO add your handling code here:
    XuatChieuPoJo xc = new XuatChieuPoJo();
    xc = (XuatChieuPoJo) this.jlstXuatChieu.getSelectedValue();
    int kq = DatVe(31, xc.getMaXC(), "NV1");
    if (kq == 1) {
        this.jButton31.setBackground(Color.red);
    } else {
        this.jButton31.setBackground(Color.gray);
    }
}//GEN-LAST:event_jButton31ActionPerformed

private void jButton32ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton32ActionPerformed
// TODO add your handling code here:
    XuatChieuPoJo xc = new XuatChieuPoJo();
    xc = (XuatChieuPoJo) this.jlstXuatChieu.getSelectedValue();
    int kq = DatVe(32, xc.getMaXC(), "NV1");
    if (kq == 1) {
        this.jButton32.setBackground(Color.red);
    } else {
        this.jButton32.setBackground(Color.gray);
    }
}//GEN-LAST:event_jButton32ActionPerformed

private void jButton33ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton33ActionPerformed
// TODO add your handling code here:
    XuatChieuPoJo xc = new XuatChieuPoJo();
    xc = (XuatChieuPoJo) this.jlstXuatChieu.getSelectedValue();
    int kq = DatVe(33, xc.getMaXC(), "NV1");
    if (kq == 1) {
        this.jButton33.setBackground(Color.red);
    } else {
        this.jButton33.setBackground(Color.gray);
    }
}//GEN-LAST:event_jButton33ActionPerformed

private void jButton34ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton34ActionPerformed
// TODO add your handling code here:
    XuatChieuPoJo xc = new XuatChieuPoJo();
    xc = (XuatChieuPoJo) this.jlstXuatChieu.getSelectedValue();
    int kq = DatVe(34, xc.getMaXC(), "NV1");
    if (kq == 1) {
        this.jButton34.setBackground(Color.red);
    } else {
        this.jButton34.setBackground(Color.gray);
    }
}//GEN-LAST:event_jButton34ActionPerformed

private void jButton35ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton35ActionPerformed
// TODO add your handling code here:
    XuatChieuPoJo xc = new XuatChieuPoJo();
    xc = (XuatChieuPoJo) this.jlstXuatChieu.getSelectedValue();
    int kq = DatVe(35, xc.getMaXC(), "NV1");
    if (kq == 1) {
        this.jButton35.setBackground(Color.red);
    } else {
        this.jButton35.setBackground(Color.gray);
    }
}//GEN-LAST:event_jButton35ActionPerformed

private void jButton36ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton36ActionPerformed
// TODO add your handling code here:
    XuatChieuPoJo xc = new XuatChieuPoJo();
    xc = (XuatChieuPoJo) this.jlstXuatChieu.getSelectedValue();
    int kq = DatVe(36, xc.getMaXC(), "NV1");
    if (kq == 1) {
        this.jButton36.setBackground(Color.red);
    } else {
        this.jButton36.setBackground(Color.gray);
    }
}//GEN-LAST:event_jButton36ActionPerformed

private void jButton37ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton37ActionPerformed
// TODO add your handling code here:
    XuatChieuPoJo xc = new XuatChieuPoJo();
    xc = (XuatChieuPoJo) this.jlstXuatChieu.getSelectedValue();
    int kq = DatVe(37, xc.getMaXC(), "NV1");
    if (kq == 1) {
        this.jButton37.setBackground(Color.red);
    } else {
        this.jButton37.setBackground(Color.gray);
    }
}//GEN-LAST:event_jButton37ActionPerformed

private void jButton38ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton38ActionPerformed
// TODO add your handling code here:
    XuatChieuPoJo xc = new XuatChieuPoJo();
    xc = (XuatChieuPoJo) this.jlstXuatChieu.getSelectedValue();
    int kq = DatVe(38, xc.getMaXC(), "NV1");
    if (kq == 1) {
        this.jButton38.setBackground(Color.red);
    } else {
        this.jButton38.setBackground(Color.gray);
    }
}//GEN-LAST:event_jButton38ActionPerformed

private void jButton39ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton39ActionPerformed
// TODO add your handling code here:
    XuatChieuPoJo xc = new XuatChieuPoJo();
    xc = (XuatChieuPoJo) this.jlstXuatChieu.getSelectedValue();
    int kq = DatVe(39, xc.getMaXC(), "NV1");
    if (kq == 1) {
        this.jButton39.setBackground(Color.red);
    } else {
        this.jButton39.setBackground(Color.gray);
    }
}//GEN-LAST:event_jButton39ActionPerformed

private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed
// TODO add your handling code here:
    XuatChieuPoJo xc = new XuatChieuPoJo();
    xc = (XuatChieuPoJo) this.jlstXuatChieu.getSelectedValue();
    int kq = DatVe(4, xc.getMaXC(), "NV1");
    if (kq == 1) {
        this.jButton4.setBackground(Color.red);
    } else {
        this.jButton4.setBackground(Color.gray);
    }
}//GEN-LAST:event_jButton4ActionPerformed

private void jButton40ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton40ActionPerformed
// TODO add your handling code here:
    XuatChieuPoJo xc = new XuatChieuPoJo();
    xc = (XuatChieuPoJo) this.jlstXuatChieu.getSelectedValue();
    int kq = DatVe(40, xc.getMaXC(), "NV1");
    if (kq == 1) {
        this.jButton40.setBackground(Color.red);
    } else {
        this.jButton40.setBackground(Color.gray);
    }
}//GEN-LAST:event_jButton40ActionPerformed

private void jButton41ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton41ActionPerformed
// TODO add your handling code here:
    XuatChieuPoJo xc = new XuatChieuPoJo();
    xc = (XuatChieuPoJo) this.jlstXuatChieu.getSelectedValue();
    int kq = DatVe(41, xc.getMaXC(), "NV1");
    if (kq == 1) {
        this.jButton41.setBackground(Color.red);
    } else {
        this.jButton41.setBackground(Color.gray);
    }
}//GEN-LAST:event_jButton41ActionPerformed

private void jButton42ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton42ActionPerformed
// TODO add your handling code here:
    XuatChieuPoJo xc = new XuatChieuPoJo();
    xc = (XuatChieuPoJo) this.jlstXuatChieu.getSelectedValue();
    int kq = DatVe(42, xc.getMaXC(), "NV1");
    if (kq == 1) {
        this.jButton42.setBackground(Color.red);
    } else {
        this.jButton42.setBackground(Color.gray);
    }
}//GEN-LAST:event_jButton42ActionPerformed

private void jButton43ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton43ActionPerformed
// TODO add your handling code here:
    XuatChieuPoJo xc = new XuatChieuPoJo();
    xc = (XuatChieuPoJo) this.jlstXuatChieu.getSelectedValue();
    int kq = DatVe(43, xc.getMaXC(), "NV1");
    if (kq == 1) {
        this.jButton43.setBackground(Color.red);
    } else {
        this.jButton43.setBackground(Color.gray);
    }
}//GEN-LAST:event_jButton43ActionPerformed

private void jButton44ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton44ActionPerformed
// TODO add your handling code here:
    XuatChieuPoJo xc = new XuatChieuPoJo();
    xc = (XuatChieuPoJo) this.jlstXuatChieu.getSelectedValue();
    int kq = DatVe(44, xc.getMaXC(), "NV1");
    if (kq == 1) {
        this.jButton44.setBackground(Color.red);
    } else {
        this.jButton44.setBackground(Color.gray);
    }
}//GEN-LAST:event_jButton44ActionPerformed

private void jButton45ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton45ActionPerformed
// TODO add your handling code here:
    XuatChieuPoJo xc = new XuatChieuPoJo();
    xc = (XuatChieuPoJo) this.jlstXuatChieu.getSelectedValue();
    int kq = DatVe(45, xc.getMaXC(), "NV1");
    if (kq == 1) {
        this.jButton45.setBackground(Color.red);
    } else {
        this.jButton45.setBackground(Color.gray);
    }
}//GEN-LAST:event_jButton45ActionPerformed

private void jButton46ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton46ActionPerformed
// TODO add your handling code here:
    XuatChieuPoJo xc = new XuatChieuPoJo();
    xc = (XuatChieuPoJo) this.jlstXuatChieu.getSelectedValue();
    int kq = DatVe(46, xc.getMaXC(), "NV1");
    if (kq == 1) {
        this.jButton46.setBackground(Color.red);
    } else {
        this.jButton46.setBackground(Color.gray);
    }
}//GEN-LAST:event_jButton46ActionPerformed

private void jButton47ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton47ActionPerformed
// TODO add your handling code here:
    XuatChieuPoJo xc = new XuatChieuPoJo();
    xc = (XuatChieuPoJo) this.jlstXuatChieu.getSelectedValue();
    int kq = DatVe(47, xc.getMaXC(), "NV1");
    if (kq == 1) {
        this.jButton47.setBackground(Color.red);
    } else {
        this.jButton47.setBackground(Color.gray);
    }
}//GEN-LAST:event_jButton47ActionPerformed

private void jButton48ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton48ActionPerformed
// TODO add your handling code here:
    XuatChieuPoJo xc = new XuatChieuPoJo();
    xc = (XuatChieuPoJo) this.jlstXuatChieu.getSelectedValue();
    int kq = DatVe(48, xc.getMaXC(), "NV1");
    if (kq == 1) {
        this.jButton48.setBackground(Color.red);
    } else {
        this.jButton48.setBackground(Color.gray);
    }
}//GEN-LAST:event_jButton48ActionPerformed

private void jButton49ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton49ActionPerformed
// TODO add your handling code here:
    XuatChieuPoJo xc = new XuatChieuPoJo();
    xc = (XuatChieuPoJo) this.jlstXuatChieu.getSelectedValue();
    int kq = DatVe(49, xc.getMaXC(), "NV1");
    if (kq == 1) {
        this.jButton49.setBackground(Color.red);
    } else {
        this.jButton49.setBackground(Color.gray);
    }
}//GEN-LAST:event_jButton49ActionPerformed

private void jButton50ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton50ActionPerformed
// TODO add your handling code here:
    XuatChieuPoJo xc = new XuatChieuPoJo();
    xc = (XuatChieuPoJo) this.jlstXuatChieu.getSelectedValue();
    int kq = DatVe(50, xc.getMaXC(), "NV1");
    if (kq == 1) {
        this.jButton50.setBackground(Color.red);
    } else {
        this.jButton50.setBackground(Color.gray);
    }
}//GEN-LAST:event_jButton50ActionPerformed

private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton5ActionPerformed
// TODO add your handling code here:
    XuatChieuPoJo xc = new XuatChieuPoJo();
    xc = (XuatChieuPoJo) this.jlstXuatChieu.getSelectedValue();
    int kq = DatVe(5, xc.getMaXC(), "NV1");
    if (kq == 1) {
        this.jButton5.setBackground(Color.red);
    } else {
        this.jButton5.setBackground(Color.gray);
    }
}//GEN-LAST:event_jButton5ActionPerformed

private void jButton51ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton51ActionPerformed
// TODO add your handling code here:
    XuatChieuPoJo xc = new XuatChieuPoJo();
    xc = (XuatChieuPoJo) this.jlstXuatChieu.getSelectedValue();
    int kq = DatVe(51, xc.getMaXC(), "NV1");
    if (kq == 1) {
        this.jButton51.setBackground(Color.red);
    } else {
        this.jButton51.setBackground(Color.gray);
    }
}//GEN-LAST:event_jButton51ActionPerformed

private void jButton52ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton52ActionPerformed
// TODO add your handling code here:
    XuatChieuPoJo xc = new XuatChieuPoJo();
    xc = (XuatChieuPoJo) this.jlstXuatChieu.getSelectedValue();
    int kq = DatVe(52, xc.getMaXC(), "NV1");
    if (kq == 1) {
        this.jButton52.setBackground(Color.red);
    } else {
        this.jButton52.setBackground(Color.gray);
    }
}//GEN-LAST:event_jButton52ActionPerformed

private void jButton53ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton53ActionPerformed
// TODO add your handling code here:
    XuatChieuPoJo xc = new XuatChieuPoJo();
    xc = (XuatChieuPoJo) this.jlstXuatChieu.getSelectedValue();
    int kq = DatVe(53, xc.getMaXC(), "NV1");
    if (kq == 1) {
        this.jButton53.setBackground(Color.red);
    } else {
        this.jButton53.setBackground(Color.gray);
    }
}//GEN-LAST:event_jButton53ActionPerformed

private void jButton54ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton54ActionPerformed
// TODO add your handling code here:
    XuatChieuPoJo xc = new XuatChieuPoJo();
    xc = (XuatChieuPoJo) this.jlstXuatChieu.getSelectedValue();
    int kq = DatVe(54, xc.getMaXC(), "NV1");
    if (kq == 1) {
        this.jButton54.setBackground(Color.red);
    } else {
        this.jButton54.setBackground(Color.gray);
    }
}//GEN-LAST:event_jButton54ActionPerformed

private void jButton55ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton55ActionPerformed
// TODO add your handling code here:
    XuatChieuPoJo xc = new XuatChieuPoJo();
    xc = (XuatChieuPoJo) this.jlstXuatChieu.getSelectedValue();
    int kq = DatVe(55, xc.getMaXC(), "NV1");
    if (kq == 1) {
        this.jButton55.setBackground(Color.red);
    } else {
        this.jButton55.setBackground(Color.gray);
    }
}//GEN-LAST:event_jButton55ActionPerformed

private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton6ActionPerformed
// TODO add your handling code here:
    XuatChieuPoJo xc = new XuatChieuPoJo();
    xc = (XuatChieuPoJo) this.jlstXuatChieu.getSelectedValue();
    int kq = DatVe(6, xc.getMaXC(), "NV1");
    if (kq == 1) {
        this.jButton6.setBackground(Color.red);
    } else {
        this.jButton6.setBackground(Color.gray);
    }
}//GEN-LAST:event_jButton6ActionPerformed

private void jButton8ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton8ActionPerformed
// TODO add your handling code here:
    XuatChieuPoJo xc = new XuatChieuPoJo();
    xc = (XuatChieuPoJo) this.jlstXuatChieu.getSelectedValue();
    int kq = DatVe(8, xc.getMaXC(), "NV1");
    if (kq == 1) {
        this.jButton8.setBackground(Color.red);
    } else {
        this.jButton8.setBackground(Color.gray);
    }
}//GEN-LAST:event_jButton8ActionPerformed
// </editor-fold>

// <editor-fold defaultstate="collapsed" desc="Tạo control của netbean">
private void jButton9ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton9ActionPerformed
// TODO add your handling code here:
    XuatChieuPoJo xc = new XuatChieuPoJo();
    xc = (XuatChieuPoJo) this.jlstXuatChieu.getSelectedValue();
    int kq = DatVe(9, xc.getMaXC(), "NV1");
    if (kq == 1) {
        this.jButton9.setBackground(Color.red);
    } else {
        this.jButton9.setBackground(Color.gray);
    } 
   
}//GEN-LAST:event_jButton9ActionPerformed
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton10;
    private javax.swing.JButton jButton11;
    private javax.swing.JButton jButton12;
    private javax.swing.JButton jButton13;
    private javax.swing.JButton jButton14;
    private javax.swing.JButton jButton15;
    private javax.swing.JButton jButton16;
    private javax.swing.JButton jButton17;
    private javax.swing.JButton jButton18;
    private javax.swing.JButton jButton19;
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButton20;
    private javax.swing.JButton jButton21;
    private javax.swing.JButton jButton22;
    private javax.swing.JButton jButton23;
    private javax.swing.JButton jButton24;
    private javax.swing.JButton jButton25;
    private javax.swing.JButton jButton26;
    private javax.swing.JButton jButton27;
    private javax.swing.JButton jButton28;
    private javax.swing.JButton jButton29;
    private javax.swing.JButton jButton3;
    private javax.swing.JButton jButton30;
    private javax.swing.JButton jButton31;
    private javax.swing.JButton jButton32;
    private javax.swing.JButton jButton33;
    private javax.swing.JButton jButton34;
    private javax.swing.JButton jButton35;
    private javax.swing.JButton jButton36;
    private javax.swing.JButton jButton37;
    private javax.swing.JButton jButton38;
    private javax.swing.JButton jButton39;
    private javax.swing.JButton jButton4;
    private javax.swing.JButton jButton40;
    private javax.swing.JButton jButton41;
    private javax.swing.JButton jButton42;
    private javax.swing.JButton jButton43;
    private javax.swing.JButton jButton44;
    private javax.swing.JButton jButton45;
    private javax.swing.JButton jButton46;
    private javax.swing.JButton jButton47;
    private javax.swing.JButton jButton48;
    private javax.swing.JButton jButton49;
    private javax.swing.JButton jButton5;
    private javax.swing.JButton jButton50;
    private javax.swing.JButton jButton51;
    private javax.swing.JButton jButton52;
    private javax.swing.JButton jButton53;
    private javax.swing.JButton jButton54;
    private javax.swing.JButton jButton55;
    private javax.swing.JButton jButton6;
    private javax.swing.JButton jButton7;
    private javax.swing.JButton jButton8;
    private javax.swing.JButton jButton9;
    private javax.swing.JInternalFrame jInternalFrame1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JSeparator jSeparator1;
    private javax.swing.JSeparator jSeparator2;
    private javax.swing.JSeparator jSeparator3;
    private javax.swing.JList jlstPhim;
    private javax.swing.JList jlstXuatChieu;
    // End of variables declaration//GEN-END:variables
}
// </editor-fold>